The 18-year-old marked his country's call for the decisive final match of the series by dismissing the Waugh twins within three balls. Ten balls later he bowled Darren Lehmann's for a first-day haul of 3 for 37.
The left arm spinner and attacking one-day opener was a last-minute replacement for the ill Saeed Anwar. Pakistan, 1-0 down, have not lost a home series to Australia since 1959-60. Nor have they tasted defeat in a Karachi test in 44 years - 32 games.
Australia suffered another body blow after Shahid's demolition job when the opener Michael Slater fell just four runs short of his ninth test century. He was smartly stumped by Moin Khan off the recalled Arshad Khan for a fighting 96. Dropped on 25 and 45, he batted for 330 minutes and faced 257 balls. His innings was studded with nine boundaries and two sixes off the off-spinner Arshad.
Slater, who reached 3,000 Test runs when he had made 52, was hit twice on the temple in the first session when Wasim Akram gave him a barrage of bouncers.
Shahid, a veteran of 66 one-day internationals, accounted for Mark Waugh (26) with a brilliant catch by Inzamam-ul-Haq. Two balls later he left Steve Waugh (0) stranded in front of the wickets off a faster ball. Lehmann (3) dragged the ball on to his stumps while trying to play a forceful drive. "I am sure I will not be labelled a one-day specialist any more," Shahid said.
Mark Taylor, electing to bat on a slow and turning pitch, was the first to go. Australia's captain, who made 334 not out and 92 in the drawn second Test, tried to pull a delivery from Arshad and was caught at mid-wicket by Inzamam.
Justin Langer was the only Pakistan success in the post- lunch session when he was trapped in front off Shoaib Akhtar. Langer (30) put on 67 for the second wicket with Slater in 117 minutes.
The third-wicket partnership between Slater and Mark Waugh yielded 64 in 117 minutes. But the dismissal of Waugh Jnr triggered a collapse as Australia lost their last four wickets in a space of 38 runs.
First day of five, Australia won toss
AUSTRALIA - First Innings
*M A Taylor c Inzamam b Arshad Khan 16
M J Slater st Moin Khan b Arshad Khan 96
J L Langer lbw b Shoaib Akhtar 30
M E Waugh c Inzamam b Shahid Afridi 26
S R Waugh lbw b Shahid Afridi 0
D S Lehmann b Shahid Afridi 3
I A Healy not out 14
G R Robertson not out 4
Extras (1b, 8lb, 9nb) 18
Total (for 6, 91 overs) 207
Fall: 1-38, 2-105, 3-169, 4-169, 5-179, 6-189.
To bat: C R Miller, S C G MacGill, G D McGrath.
Bowling: Wasim Akram 11-1-34-0; Shoaib Akhtar 9.2-3-26-1; Shakeel Ahmed 21.4-8-43-0; Arshad Khan 34-13-58-2; Shahid Afridi 15-5-37-3.
PAKISTAN: *Aamir Sohail, Shahid Afridi, Inzamam-ul-Haq, Salim Malik, Ijaz Ahmed Yousuf Youhana, Moin Khan, Wasim Akram, Arshad Khan, Shakeel Ahmed, Shoaib Akhtar.
Umpires: Riazuddin (Pak) and D L Orchard (SA).Reuse content