The Pakistani team Stops the Proteas' 10-match Victory Run.
Shaheen Afridi secured four wickets in the second innings following going wicketless in the initial innings.
Opening Test, the Gaddafi Stadium (day four)
Pakistan 378 (Imam 93, Agha 93; Senuran Muthusamy 6-117) & 167 (Babar 42; Muthusamy 5-57)
South Africa 269 (De Zorzi 104; Noman Ali 6-112) & 183 (Dewald Brevis 54; Shaheen 4-33, Noman 4-79)
Pakistan won by 93 runs
Pakistan brought an end to the reigning champions the Proteas' winning streak by completing a 93-run victory in an exciting and competitive opening Test in Lahore.
South Africa, whose 10-Test winning streak in Test cricket culminated in victory over Australia in the WTC final in the month of June, were dismissed for 183 in pursuit of 277.
Starting the day on 51-2, they lost first-innings centurion Tony 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 favour.
Slow left-armer Noman Ali, who took 10 wickets for 191 runs in the match, dismissed Tristan Stubbs for 2 and bowled Dewald Brevis, who put up a fight with a rapid 54.
Off-spinner Sajid Khan also took advantage of significant spin to terminate opener Ryan Rickelton's stay - he lasted 145 deliveries for 45 - and Shaheen came back in the post-lunch session to dismiss the tail with a impressive exhibition of reverse-swing bowling.
He had Verreynne leg before for 19 and dismissed Subrayen and Kagiso Rabada to secure the victory.
It was each team's opening game of the 2025-2027 World Test Championship cycle and moves the hosts directly into second place after leaders the Australian team.
The win was founded on contributions of ninety-three by opener Imam-ul-Haq and, crucially, all-rounder Agha which lifted them to three hundred and seventy-eight.
After that spinners Noman Ali and Sajid took advantage of helpful home pitches, as they did in their Test series win over England last year, to maintain their lead.
The next and last match begins on October 20.