NEW DELHI: South Africa crushed Pakistan by eight wickets on Thursday to level the two-Test series, with off-spinner Simon Harmer starring with a brilliant six-wicket haul.

After Pakistan had taken the series lead with a 93-run win in Lahore last week, Harmer turned the tables on another spin-friendly surface in Rawalpindi, claiming 6 for 50 to bundle out the hosts for just 138 on Day 4.

Set a modest target of 68, the World Test Championship winners cruised to victory, finishing at 73 for 2 in 12.3 overs - their first Test win in Pakistan for the first time since 2007.

Harmer, along with left-arm spinner Keshav Maharaj - who returned from injury after missing the first Test - played pivotal roles in South Africa's triumph, sharing 17 wickets between them in the match.

South Africa skipper Aiden Markram made a brisk 42 off 45 balls with eight fours to power the chase before he was trapped lbw by Noman Ali when his team needed only four runs for victory.

Tristan Stubbs, one of the four half-century makers in South Africa's first innings of 404, was out for a duck when he edged Noman to slip, before Ryan Rickelton (25 not out) smashed Sajid Khan for six to secure the win just before the scheduled lunch interval.

Harmer became only the third South African bowler to reach the 1,000-wicket milestone in first-class cricket when he had Noman caught behind, and Pakistan's second innings collapsed in just over an hour.

The home team's hopes hinged on overnight batters Babar Azam and Mohammad Rizwan to lift them from 94-4, but both fell to Harmer inside off-spinner's first three overs of the morning.

Babar, 49 overnight, completed his first half-century of the series with a single and it was loudly applauded by his fans at the Pindi Cricket Stadium. However, Harmer pinned Pakistan’s premier batter lbw with a delivery that spun back and hit Babar low on the pads.

Babar, who hasn't scored a test century since December 2022, went for a review but the television replays indicated the ball didn’t make any contact with the bat before hitting the pads flush in front of the wickets.

Harmer then got an inside edge off Rizwan’s bat and the ball popped to Tony de Zorzi close to the wicket as Pakistan lost two key wickets inside the first 20 minutes and led by just 34 runs.

Salman Ali Agha made rearguard 28 off 42 balls but chopped Maharaj back onto his stumps before the left-armer had Khan stumped to finish off Pakistan's resistance.

(With AP Inputs)