The Pakistani team Stops the Proteas' 10-match Unbeaten Run.
Shaheen Afridi claimed a quartet of wickets in the final innings following going wicketless in the first session.
First Test, Lahore (day four)
The home side 378 (Imam-ul-Haq 93, Agha 93; Senuran Muthusamy 6-117) & 167 (Babar 42; the spinner 5-57)
The visitors 269 (Tony de Zorzi 104; Noman Ali 6-112) & 183 (Dewald Brevis 54; Shaheen 4-33, Noman Ali 4-79)
Pakistan won by 93 runs
The national team halted world champions South Africa's unbeaten run by completing a 93-run margin triumph in an exciting and competitive opening Test in the city of Lahore.
South Africa, who had a 10-match winning streak in the longest format ended with victory over the Aussies in the WTC 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 De Zorzi leg before wicket to left-arm quick Shaheen Afridi to the third ball of the day to shift the tightly balanced run chase in Pakistan's favor.
Left-arm spinner Noman Ali, who secured 10 wickets for 191 runs in the match, removed Tristan Stubbs for two and clean bowled Brevis, who offered some resistance with a rapid 54.
Off-spinner Sajid also capitalized on significant spin to terminate opening batsman Ryan Rickelton's innings - he lasted 145 deliveries for 45 runs - and Afridi returned in the afternoon session to knock over the lower order with a impressive exhibition of reverse-swing bowling.
He trapped Kyle Verreynne lbw for 19 and bowled Subrayen and Rabada to seal the win.
It was both sides' first match of the 2025-27 Test championship cycle and propels Pakistan straight into second place after leaders Australia.
The win was built around key performances of 93 by opener Imam-ul-Haq and, crucially, number seven Agha which boosted them to three hundred and seventy-eight.
From there spinners Noman and Sajid utilized helpful home pitches, as they had in their series victory over the English team the previous year, to maintain their advantage.
The second and final Test starts on 20 October.