Pakistan grabbed the prized wickets of Steve Smith and Marnus Labuschagne in quick succession before lunch.
Smith and Labuschagne, who both average over 70 in Tests at the Sydney Cricket Ground, looked set in the extended morning session before a stunning late double-wicket breakthrough.
Smith fell into a carefully laid Pakistani trap of stacking a trio of fielders around short extra cover off medium pacer Mir Hamza's bowling.
Smith duly walked down the wicket next ball to play an aerial drive, only to be caught by Babar Azam above his head.
Australia's premier batsman made 38 off 86 balls and looked stunned as he glared at a patch in the pitch, before walking disconsolately from the ground 30 minutes before lunch.
He was followed six balls later by Labuschagne, bowled for 60 by offspinner Agha Salman.
Labuschagne played forward only to be beaten by a sharply turning ball out of the rough and spearing through the bat-pad gap to knock over his middle stump.
However, the dynamics of the game took a significant turn post-lunch when Saim Ayub missed yet another catch, this time off the bat of Marsh who was at 7* not out. Salman delivered a tempting delivery, enticing Marsh to advance down the track. Unfortunately, Ayub couldn't hold onto the ball as Marsh executed a poorly timed drive, and it just slipped through his outstretched hands. Marsh went onto score his fourth fifty of the series.
Earlier in the innings, Saim Ayub had also dropped David Warner when he was at the crease with a score of 20. Warner, however, couldn't capitalize on the second chance and eventually departed after adding 34 runs to his name.
Sajid Khan dismissed Alex Carey just before Tea, leaving Australia at 289-6. Despite the setback, they were still trailing Pakistan by 24 runs at that point in the match.