Australia lost the wicket of Alex Carey for 38 in the final over and went to tea at 289-6 with Marsh unconquered on 50 and trailing Pakistan by just 24 runs.
Marsh continued his rich vein of form after scores of 90, 63 not out and 96 in the first two Tests.
Carey was bowled by Sajid Khan, playing forward to the spinner with the ball brushing his sweater to dislodge the leg bail.
The pair had put on a stand of 84 runs to restore the innings after the loss of Steve Smith, Marnus Labuschagne and Travis Head earlier in the day at Sydney Cricket Ground.
Head failed to get going again when he was judged lbw to Aamer Jamal for 10, losing a review in the process.
Head, one of the heroes of Australia's World Cup final win over India this year, scored 40, 14, 17 and 0 in the first two Tests of the series, both won by the hosts.
Marsh had a big moment on seven when he was dropped in a tough low chance by Saim Ayub off the bowling of Agha Salman.
The big all-rounder, known as "the Bison", also survived a review for lbw to Hasan Ali when he was on 31.
Pakistan had grabbed the prized wickets of Smith and Labuschagne in the space of six balls in the extended morning session to seize the momentum, before it was wrested away.
Smith and Labuschagne, who both average over 70 in Tests at the SCG, looked well set 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 Hasan'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.
He was soon followed by Labuschagne, bowled for 60 off 147 balls by offspinner Salman.
It was deserved reward for the toiling Pakistanis, who have battled away with disciplined bowling and determined fielding despite already losing the three-match series.
Australia clinched the series with a tense 79-run win in the second Test in Melbourne.
Source: France 24
BDST: 1112 HRS, JAN 05, 2024
MN