Josh Hazlewood has broken down the door for Australia to claim a 3-0 series whitewash after a triple-wicket maiden ripped the heart out of Pakistan late on day three at the SCG.
The tourists went to stumps at 7-68, a lead of 82, on a rollicking Friday in which 15 wickets fell and both sides enjoyed spells in control.
Australia will still have to bat last on an SCG wicket that is wearing quickly, but are clearly on top after Hazlewood reached the close with figures of 4-9.
With Pakistan still holding some hope at 4-67 late in the day, the 32-year-old quick ran through what had previously been a gutsy and resilient touring team.
Brought back to bowl one over late in the day, Hazlewood had Saud Shakeel (two) caught at slip from his first ball and then skittled nightwatchman Sajid Khan for a duck.
By the time he had a scoreless Agha Salman edging the fifth ball of his over to David Warner at first slip, Pakistan were a crushed team and the 37,129 fans at the SCG were rocking.
"That's why Test cricket is so exciting," Australia's wicketkeeper Alex Carey said.
"You have six hours of play and then the last five minutes you get the crowd going like that.
"Growing up you play backyard cricket, you come in, you watch the last little bit and it's just so exciting to see an over like that."
Hazlewood was on from the outset and claimed the key scalp of Shan Masood caught behind from his second ball of the innings earlier in the session.
The usually reserved Hazlewood leapt high into the air with a fist pump as he helped get Australia on a roll.
"It means a lot for this playing group to win games of cricket, to stay in contests, to never feel like we're out of it," Carey said.
Mitchell Starc handed opener Abdullah Shafique a pair of ducks for the match, bowling him with the ball of the Test that swung and seamed back between bat and pad.
Said Ayub (33) and Babar Azam (23) offered the sole resistance for Pakistan, but their dismissals to Nathan Lyon and Travis Head opened the door for Hazlewood's magic spell.
Frustratingly for Pakistan, they had been the better team for the majority of Friday.
While Marnus Labuschagne (60) and Mitch Marsh (54) worked Australia towards parity, the tourists took 5-10 late in the innings to establish a 14-run lead.
In doing so, they became the first touring team to claim a first-innings advantage in Australia since India in the 2020 Boxing Day Test.
Australia's wickets fell in clumps, losing 3-18 either side of lunch after Steve Smith (38) and Labuschagne put on 79 for the third wicket.
Marsh and Alex Carey (38) had a stand of 84 for the sixth wicket, with the former's half-century his sixth score above 50 since his return to the side six months ago.
But when Carey was bowled on the last ball before tea with a Sajid Khan ball that brushed the leg bail after coming off his hip, the game turned and Australia collapsed quickly.
Marsh hit Aamir Jamal straight to cover after tea, before the Pakistan quick rolled through the tail to finish with 6-69.
In doing so, Aamir again confirmed his status as one of Pakistan's finds of the tour.
But after Hazlewood's work late on Friday, the tourists look sure to leave Australia without a victory.