After rejecting a chance to rest front-liners and promising to keep its foot on the pedal, the Australians squeezed out a fifth straight win defending a total since its only loss of the tournament to India. The defending champions extended their lead atop the standings to three points over unbeaten India, which has two games in hand.
The New Zealanders would have cemented a semifinal position with a win, but after their bowlers earned them a winning target of 244, they were overwhelmed by an even better display of bowling from the defending champions. The Kiwis were all out for 157 in the 44th over with Mitchell Starc taking tournament-best figures of 5-26, his second 5-for of the event.
He has 23 wickets, one more than he took in the 2015 World Cup, with at least two more matches to play.
Afghanistan captain Gulbadin Naib says he wasn't aware of any aggression between Afghan and Pakistan fans outside the Cricket World Cup venue at Headingley.
The International Cricket Council said it was investigating "scuffles" between rival fans outside the venue before the game, and there were reports of two fans ejected during the match.
West Yorkshire Police told the BBC officers attended the stadium "to disperse the group without any issues and remained on patrol in the area."
A small group of fans ran onto the pitch after Pakistan finished off a three-wicket win with two balls to spare.
Naib said what he witnessed was a lot of passion from fans of both teams.
"They love their players, they love their heroes. They also want to meet everyone," Naib told a news conference. "They don't want harm anyone. They just want to hug and touch. So for me it's nothing."
"It's not good for them coming on the ground ... discipline-wise it's not feeling good at the end, they should be outside the playing area," he added "I'm saying that I think they love players. That's why they come on the ground."
New Zealand was 92-2 after 25 overs while chasing 244 to beat Australia and qualify for the World Cup semifinals.
New Zealand was preferring to save wickets rather than go hard on a used pitch that had something for everyone. Australia was 112-5 at the same point.
At the crease were New Zealand's best batsmen, captain Kane Williamson, 36 not out, and Ross Taylor, 20 not out. They're partnership was worth 50.
Openers Martin Guptill (20) and Henry Nicholls (8) were dismissed by left-arm fast bowler Jason Behrendorff.
Australia had already resorted to using part-time spinners Steve Smith, Aaron Finch, and Glenn Maxwell, along with specialist Nathan Lyon.
Prime Minister Imran Khan was quick to congratulate the Pakistan team after its tense win over Afghanistan with two balls to spare in a pivotal Cricket World Cup group game at Leeds. The 1992 World Cup-winning captain also had praise for the Afghan players, many who learned the game while living in Pakistan.
Imran posted a message on Twitter within minutes of Imad Wasim's winning boundary at Headingley.
"Congratulations to the Pakistan team for keeping their nerve under pressure and in the end winning against Afghanistan," he wrote. "I also especially want to congratulate Afghanistan for the grit and determination with which they played against Pakistan today & against India earlier."
Pakistan moved into fourth place in the World Cup standings with nine points, one ahead of England, and improved its chances of reaching the semifinals. England must beat either unbeaten India on Sunday or New Zealand in its last group game to have any chance of reaching the playoffs.
There have been similarities in the campaigns of Sarfaraz Ahmed's team in England and Imran's team in 1992, when Pakistan won its only World Cup title. Leading into the game against Afghanistan, Pakistan had three wins, three losses and a washout — that's the same record the '92 champions had after seven games.
Pakistan has edged Afghanistan by three wickets with two balls to spare in a tense finish to overhaul England and move into fourth spot on the Cricket World Cup standings.
Imad Wasim hit a boundary for the winning runs and finished unbeaten on 49 with Pakistan on 230-7. He shared a 24-run stand with No. 9 Wahab Riaz, who was unbeaten on 15.
Wahab, with Pakistan needing 16 off 11, hit a six off Rashid Khan and then ran a risky two — despite the two unnecessary run outs that compounded pressure earlier in the innings.
A small group of fans spilled onto the field at Headingley to congratulate the players, waving flags and causing all kinds of issues for the security.
Teenage paceman Shaheen Afridi took 4-47 earlier as Pakistan restricted Afghanistan to 227-9. It was an eighth consecutive loss for Afghanistan and a second narrow defeat to a regional rival — it followed an 11-run loss to two-time champion India.
Usman Khawaja and Alex Carey rescued Australia from 92-5 against New Zealand to give the defending champions a competitive total at 243-9 in the day-night group match at Lord's.
Fast bowler Trent Boult finished the innings with a last-over hat trick on a used pitch offering movement and turn. New Zealand is trying to qualify for the semifinals.
Already through to the semifinals, Australia has successfully defended a total five times out of five at this tournament. But the lowest defended was 285 last Tuesday against England, also at Lord's.
Khawaja made 88 and Carey 71 in a fightback worth 107 for the sixth wicket.
Khawaja went to the crease in the fifth over, survived two drops and a run out chance to play the anchor role, and was the first wicket in the 50th of Boult's hat trick.
Boult, Lockie Ferguson and Jimmy Neesham cleaned out the Australia top order with a couple of exceptional catches, but Khawaja and Carey, who hit 11 boundaries in his 72-ball knock, toughed out the New Zealand attack to give Australia a reasonable chance of a seventh win in eight matches.
Pakistan is 103-3 after 25 overs as it pursues the 228 it needs to beat Afghanistan and move ahead of England and into fourth spot in the World Cup standings.
Pakistan lost Fakhar Zaman on the second ball of the run chase, trapped lbw by Mujeeb Ur Rahman.
Imam-ul-Haq (36) and Babar Azam (45) put on 72 for the second wicket and were coasting until Mohammad Nabi struck twice to remove both established batters in consecutive overs.
Imam was stumped on the last ball of the 16th over when he charged Nabi, missed a quicker, wider ball and was easily out of his ground when wicketkeeper Ikram Ali Khil whipped off the bails.
Babar attempted a sweep to a full ball on the second delivery of the 18th over and was bowled.
At the halfway mark, Mohammad Hafeez was on 15 and Haris Sohail was on seven.
Afghanistan has lost its first seven games, but is playing for pride against neighboring Pakistan.
England captain Eoin Morgan has the same answer when asked if his team will risk playing recuperating players against India at Edgbaston on Sunday.
England opening batsman Jason Roy has been out with a hamstring injury and missed games against Afghanistan, Sri Lanka, and Australia. He is hoping to play against India but a decision won't be taken until Sunday, Morgan said.
Asked if England would field the heavy hitter even if it was a risk to Roy, Morgan said: "If it was going to rule him out long term, absolutely not. If it was going to rule him out for a couple of weeks, yes."
Jofra Archer, a tournament standout with 16 wickets, has a side problem and Morgan said "the exact same rule applies" over whether the England fast bowler will play. "If it's going to rule him out long term, no. If it's going to be short term, yes."
England needs to win at least one of its last two group games — against India and New Zealand — to qualify for the semifinals.
Australia opted to bat first on a used pitch and was in trouble at 112-5 after 25 overs against New Zealand in the day-night match at Lord's.
The New Zealand bowlers were exceling, backed up by extraordinary catches on a sunny afternoon with the temperature hitting 33 Celsius (91 F).
David Warner and captain Aaron Finch, averaging 91 as opening partners, were split on 15 when Finch was trapped plumb in front by a Trent Boult inswinger on 8.
Warner, the tournament leading scorer just ahead of Finch, was out for 16, swaying back from a Lockie Ferguson riser which scraped the Australian opener's glove.
Warner was booed off and Steve Smith booed in at the home of cricket. Two overs later Smith was gone for 5. A vicious pull at Ferguson flew straight to Martin Guptill at leg gully. Guptill, just 19 meters away, had an estimated 0.6 seconds to react, lean left, and trap the ball in his left hand.
Allrounder Jimmy Neesham, bowling up the Lord's slope, induced an edge behind from Marcus Stoinis (8), and in his next over he bowled at and brilliantly caught Glenn Maxwell for a duck.
Usman Khawaja was 40 not out off 61 balls, and Alex Carey on 12.
Afghanistan has finished on 227-9 against Pakistan after choosing to bat at Headingley.
The total shouldn't be too challenging for Pakistan, although Afghanistan's bowlers will enjoy the spin-friendly wicket in Leeds.
Asghar Afghan hit a brisk 42 from 35 balls, including three fours and two sixes, before being bowled by Shadab Khan. Najibullah Zadran hit six fours in a slightly slower 42, from 54 deliveries, and was also bowled, this time by Shaheen Afridi, who finished on 4-47 from 10 overs.
Imad Wasim and Wahab Riaz both took two wickets.
Pakistan still has a chance of a semifinal spot. Afghanistan is playing for pride after seven defeats at the tournament.
India captain Virat Kohli admits to being surprised at host England's struggles at the tournament so far. But he thinks he knows why.
"Everyone is a bit surprised. We thought England would probably dominate in their own conditions but, as I said at the beginning of the tournament, pressure is going to be a factor and low scores are going to be defended," Kohli said ahead of India's game against England at Edgbaston on Sunday.
"I said that because I have played at two World Cups and all the teams are very strong. Anyone can beat anyone and we got a scare from Afghanistan, so you can't take anything for granted."
England has won four and lost three games, including the last two against Sri Lanka and Australia.
"We will see what happens," Kohli said. "The other teams have outplayed England on occasions and although we have not lost a game, we cannot be complacent."
The International Cricket Council says it is aware of "some scuffles" outside the World Cup game between Pakistan and Afghanistan at Leeds and is working with police and security.
There were reports on social media of skirmishes involving opposing fans outside the stadium, and of at least two fans being ejected from the game.
"We do not condone it and we will take appropriate action against any anti-social behavior," the ICC said in a statement to British broadcasters.
Pakistan is still in contention for the World Cup semifinals and can move above England in the standings with a victory over Afghanistan, which lost its first seven games at the 10-team tournament.
Veteran fast bowler Nuwan Pradeep has been ruled out of Sri Lanka's squad for the remainder of the World Cup after contracting chickenpox.
The 32-year-old right-armer had taken five wickets in the tournament, taking 4-31 in the win over Afghanistan and 1-38 in the upset victory over England at Leeds last week.
Pradeep missed the loss at South Africa on Friday in Durham and has been replaced in the 15-man squad by Kasun Rajitha for Sri Lanka's last two games.
The 26-year old Rajitha has five wickets in his six ODI appearances.
Sri Lanka must win its last two games against West Indies and India to have any chance of reaching the semifinals.
Australia won the toss and chose to bat first against New Zealand in their day-night group match at Lord's.
Australia, already qualified for the semifinals, is unchanged from the side which beat tournament-host England on Tuesday by 64 runs, also at Lord's.
The Australians have won their last four games from batting first.
New Zealand made its first changes in the tournament, following its first loss, to Pakistan on Wednesday. Opening batsman Henry Nicholls starts in place of Colin Munro, and spinner Ish Sodhi is in for fast bowler Matt Henry.
Nicholls was the established opener with Martin Guptill but hurt his left hamstring before the tournament. He's been fit for the last four games and sat them out with fast bowler Tim Southee.
The match will start with the temperature at 32 degrees C (89 F).
New Zealand: Martin Guptill, Henry Nicholls, Kane Williamson (captain), Ross Taylor, Tom Latham, Jimmy Neesham, Colin de Grandhomme, Mitchell Santner, Ish Sodhi, Lockie Ferguson, Trent Boult.
Australia: Aaron Finch (captain), David Warner, Usman Khawaja, Steve Smith, Glenn Maxwell, Marcus Stoinis, Alex Carey, Pat Cummins, Mitchell Starc, Jason Behrendorff, Nathan Lyon.
Shaheen Afridi had a hat-trick opportunity after claiming two early wickets as Pakistan made a strong start before Afghanistan staged a recovery.
Afghanistan recovered from 27-2 to reach 120-3 after 25 overs of a game Pakistan needs to win as it pursues a World Cup semifinal spot.
Shaheen, a 19-year-old seamer, had Afghanistan captain Gulbadin Naib caught behind for 15 and dismissed Hashmatullah Shahidi immediately after for a golden duck.
With one ball left in the fifth over, Ikram Ali Khil denied Shaheen his hat trick.
Asghar Afghan on 42, and Ikram on 22, stabilized the innings.
Afghanistan skipper Gulbadin Naib won the toss and elected to bat against Pakistan in their Cricket World Cup group game at Headingley.
Pakistan is still in contention for a semifinal spot after beating New Zealand by six wickets on Wednesday and has retained the same XI.
Afghanistan can't be taken for granted in Leeds. It has lost all its previous seven games but gave India an unexpected scare in Southampton. It made one change to the lineup that lost to Bangladesh by 62 runs on Monday, bringing in veteran paceman Hamid Hassan for Dawlat Zadran.
Pakistan won the World Cup in 1992 and now has the same win-loss record through seven games as it did 27 years ago — three wins, three losses and one no result.
Conditions are hot and the wicket appears good.
Afghanistan: Gulbadin Naib, Hashmatullah Shahidi, Ikram Ali Khil, Asghar Afghan, Mohammad Nabi, Najibullah Zadran, Samiullah Shinwari, Rashid Khan, Hamid Hassan, Mujeeb Ur Rahman, Rahmat Shah.
Pakistan: Fakhar Zaman, Imam-ul-Haq, Babar Azam, Mohammad Hafeez, Haris Sohail, Sarfaraz Ahmed, Imad Wasim, Shadab Khan, Wahab Riaz, Mohammad Amir, Shaheen Afridi.
New Zealand needs one more win to join defending champion Australia in the Cricket World Cup semifinals. They meet on Saturday at Lord's in a day-night match.
Pakistan needs to beat Afghanistan in Leeds to stay in semifinal contention. A win would lift Pakistan above England and into fourth in the standings.
New Zealand and Australia have lost only once each in this edition, but the Kiwis had a washout.
They have won their last two matchups against Australia, but they haven't won three in a row in more than 12 years.
Australia has a 7-3 win-loss record against the Kiwis in World Cups, the last of them in the 2015 final.
David Warner, with 500, and captain Aaron Finch, with 496, lead the run-scorers in this World Cup, and are close to catching Ricky Ponting (539 in 2007) for second most by an Australian in a single edition. Matthew Hayden leads with 659, also in 2007.
Despite also being neighbors, Pakistan and Afghanistan have met only three times in one-day internationals, neither in their own countries. Pakistan has won all three, the last two in the Asia Cups of 2014 and 2018.
This will be their first meeting in a World Cup.
Fast bowler Wahab Riaz has 32 wickets all-time in World Cups, and needs two more to equal Imran Khan for second place for Pakistan. Wasim Akram leads with 55.
Gulbadin Naib needs one more wicket to equal the record for most by an Afghani in a single edition, 10 by Shapoor Zadran in 2015.
Afghanistan has lost all seven of its matches, so far, its longest losing streak in ODIs.
More AP cricket: www.apnews.com/cricket and https://twitter.com/AP_Sports