The Pakistani team Ends South Africa's 10-match Unbeaten Run.
Shaheen Afridi secured a quartet of wickets in the second innings following failing to take a wicket in the first session.
First Test, Lahore (the fourth day)
The home side 378 (Imam-ul-Haq 93, Agha 93; Muthusamy 6-117) & 167 (Babar Azam 42; Muthusamy 5-57)
The visitors 269 (Tony de Zorzi 104; Noman 6-112) & 183 (Dewald Brevis 54; Shaheen Afridi 4-33, Noman Ali 4-79)
Pakistan won by 93 runs
The national team terminated world champions South Africa's unbeaten run by sealing a 93-run margin victory in an thrilling and hard-fought opening Test in the city of Lahore.
The Proteas, who had a 10-match winning streak in the longest format culminated in a win against Australia in the WTC final in June, were dismissed for 183 chasing 277.
Having resumed on 51-2, they saw the dismissal of first-innings centurion Tony de Zorzi leg before wicket to left-arm quick Afridi to the third delivery of the day to shift the tightly balanced chase in the home team's favor.
Left-arm spinner Noman Ali, who claimed 10 wickets for 191 runs in the game, removed Tristan Stubbs for two and clean bowled Dewald Brevis, who offered some resistance with a rapid 54.
Off-spinner Sajid also took advantage of sharp turn to end opener Rickelton's innings - he faced 145 balls for 45 - and Shaheen returned in the afternoon session to knock over the lower order with a impressive exhibition of reverse-swing bowling.
He trapped Kyle Verreynne leg before for nineteen and dismissed Prenelan Subrayen and Rabada to seal the victory.
It was each team's opening game of the 2025-27 Test championship cycle and propels Pakistan directly into the number two spot behind table-toppers Australia.
The win was founded on contributions of 93 by opening batsman Imam-ul-Haq and, importantly, all-rounder Agha which lifted them to three hundred and seventy-eight.
After that slow bowlers Noman Ali and Sajid took advantage of helpful home pitches, as they had in their series victory over the English team last year, to maintain their advantage.
The next and final Test starts on 20 October.