The Pakistani team Stops the Proteas' 10-Test Unbeaten Run.
The left-arm pacer claimed a quartet of wickets in the second innings after going wicketless in the first session.
First Test, Lahore (day four)
The home side 378 (Imam 93, Salman Agha 93; Senuran Muthusamy 6-117) & 167 (Babar 42; the spinner 5-57)
South Africa 269 (Tony de Zorzi 104; Noman Ali 6-112) & 183 (Brevis 54; Shaheen 4-33, Noman Ali 4-79)
Pakistan won by 93 runs
The national team brought an end to world champions South Africa's unbeaten run by achieving a 93-run margin win in an exciting and hard-fought first Test in Lahore.
South Africa, whose 10-Test unbeaten run in Test cricket ended with a win against Australia in the World Test Championship final in June, were bowled out for 183 in pursuit of 277.
Having resumed on 51-2, they saw the dismissal of first-innings centurion Tony de Zorzi lbw to pace bowler Shaheen Afridi to the third ball of the day to shift the finely-poised chase in the home team's favor.
Slow left-armer Noman Ali, who claimed 10 wickets for 191 runs in the game, dismissed Stubbs for two and clean bowled Dewald Brevis, who put up a fight with a run-a-ball 54.
Off-spinner Sajid also capitalized on sharp turn to terminate opener Rickelton's innings - he lasted 145 deliveries for 45 - and Shaheen came back in the post-lunch session to knock over the tail with a impressive exhibition of reverse-swing bowling.
He trapped Verreynne lbw for nineteen and dismissed Prenelan Subrayen and Rabada to seal the win.
It was both sides' first match of the 2025-2027 Test championship cycle and moves Pakistan straight into second place after table-toppers Australia.
Their victory was founded on key performances of 93 by opening batsman Imam-ul-Haq and, crucially, number seven Agha which lifted them to three hundred and seventy-eight.
From there slow bowlers Noman Ali and Sajid Khan utilized helpful home pitches, as they did in their Test series win over the English team last year, to sustain their advantage.
The second and last match starts on 20 October.