Australia captain Pat Cummins took 5-61 for his third consecutive five-wicket haul as Pakistan's brittle top order was again exposed before a combative lower order rally helped the tourists to 313 on Day 1 of the third and final cricket test.
At 96-5 shortly after lunch Wednesday, Pakistan was in grave danger of being bundled out cheaply after it had won the toss and chose to bat under bright, blue skies at the Sydney Cricket Ground.
But an enterprising counterattack led by wicketkeeper Mohammad Rizwan with a brisk 88, followed by a half-century from Agha Salmon and a stunning maiden test half-century by Aamer Jamal helped Pakistan recover to a respectable total.
Check India vs South Africa 2nd Test Day 2 live score and match update here
Australian pair David Warner, playing his final test, and Usman Khawaja had to survive one over from spinner Sajid Khan under fading light before stumps.
Warner (6 not out) in characteristic style smashed the first ball for four but was lucky later in the over as he somehow survived the ball bouncing over the stumps from a defensive shot. Australia was 6 without loss at stumps.
Much of the pre-match attention may have been on Warner's last test for Australia, but it was the pace bowlers who stole the spotlight early.
More From This Section
Mitchell Starc and Josh Hazlewood set the tone by each taking a wicket in the first two overs, before Cummins, coming off a ten-wicket haul in the Boxing Day test at Melbourne, snared two wickets including the prize scalp of Babar Azam as Pakistan batters crumbled.
Check India vs South Africa 2nd Test match details and full scorecard here
Starc (2-75) struck with the second ball, teasing Shafique into an uncontrolled swipe which the opener could only edge through to Steve Smith at second slip.
Hazlewood (1-65) struck in the next over when he had test rookie Saim Ayub edging through to Alex Carey in his debut innings.
From 4-2, Babar and Massood started the rebuild for Pakistan, with Babar especially attacking the Aussie quick bowlers.
But the rally was short-lived as Cummins removed Babar (26) with a ball that came back at the right-hander and struck him on the pad. Umpire Michael Gough turned down the initial Australian appeal, but the TV umpire overturned the decision.
Saud Shakeel was Cummins' second wicket, edging behind to Carey to leave Pakistan's first innings in tatters at 47-4.
Captain Shan Masood (35) and Rizwan shared a 49-run stand either side of the lunch break to steady Pakistan. Mitchell Marsh (1-27) ended that partnership by teasing an edge from Masood which flew through to Smith.
Rizwan went on the attack and made an enterprising half-century off 74 balls. He continued to play his shots but eventually holed out to Hazlewood to be Cummins' third wicket.
The Aussie skipper got his fourth when he had Sajid caught at midwicket by Nathan Lyon for 15 and a desereved fifth shortly after with Hasan Ali (0) picking out Starc in the deep.
In between Starc had ended Salman's impressive innings at 53 when he was caught by Travis Head at square leg.
Pakistan's lower order continued to wag and a final-wicket partnership of 86 between Jamal and Mir Hamza frustrated Australia for almost 23 overs. Jamal, who made his test debut in the series-opening match in Perth, blasted nine boundaries and four sixes in an enthralling 82 off 97 balls before finding Starc in the deep off Lyon (1-74) to end the innings.
The lead up to the match has been almost exclusively about Warner's last test for Australia, and the 112-test veteran, flanked by his three daughters, led the home team out on to the SCG for his final test.
On Tuesday, Warner took to social media to plead for the return of his baggy green test cricket cap which was in a bag that went missing in transit between Melbourne and Sydney this week. On Wednesday, he was wearing a new cap.
Australian Prime Minister Anthony Albanese added his weight to the appeal for the caps to be returned to Warner.
David Warner has represented Australia on more than one hundred occasions, Albanese said in Sydney on Wednesday. "The baggy green caps belong to him. He has earnt them and they should be returned."
Australia won the first two tests in Perth and Melbourne to clinch the three-match series but with World Test Championship points at stake, Australia named an unchanged lineup for the third consecutive match.