The Pakistani team Ends the Proteas' 10-match Victory Run.
Shaheen Afridi took a quartet of wickets in the second innings after going wicketless in the initial session.
Opening Test, the Gaddafi Stadium (day four)
The home side 378 (Imam-ul-Haq 93, Salman Agha 93; Senuran Muthusamy 6-117) & 167 (Babar 42; Muthusamy 5-57)
South Africa 269 (Tony de Zorzi 104; Noman 6-112) & 183 (Dewald Brevis 54; Shaheen Afridi 4-33, Noman 4-79)
Pakistan won by 93 runs
Pakistan halted the reigning champions South Africa's unbeaten run by completing a 93-run win in an exciting and hard-fought first Test in Lahore.
The Proteas, who had a 10-match winning streak in Test cricket culminated in a win against the Aussies in the World Test Championship final in June, were bowled out for 183 chasing 277.
Starting the day on 51-2, they saw the dismissal of century-maker Tony de Zorzi lbw to pace bowler Afridi to the third delivery of the day to shift the tightly balanced chase in the home team's favour.
Left-arm spinner Noman, who took 10-191 in the match, removed Stubbs for two and bowled Dewald Brevis, who offered some resistance with a rapid 54.
Right-arm spinner Sajid Khan also took advantage of significant spin to terminate opener Ryan Rickelton's stay - he faced 145 balls for 45 - and Afridi returned in the afternoon session to dismiss the lower order with a impressive exhibition of reverse swing.
He had Kyle Verreynne lbw for 19 and bowled Subrayen and Kagiso Rabada to seal the victory.
It was each team's first match of the 2025-2027 World Test Championship cycle and propels the hosts directly into second place after leaders the Australian team.
Their victory was built around key performances of ninety-three by opener Imam and, importantly, all-rounder Salman Agha which boosted them to three hundred and seventy-eight.
From there slow bowlers Noman Ali and Sajid utilized favourable home conditions, as they had in their Test series win over the English team last year, to maintain their advantage.
The next and last match begins on 20 October.