Pakistan sealed a 3-1 Twenty20 series win in South Africa with a nail-biting victory in the final game on Friday.

Cruising at 92-1 in the 10th over, while chasing a winning target of 145, Pakistan suddenly lost five wickets for 23 runs to slip to 115-6 in the 15th over.

More Images
Pakistan players celebrate after winning the fourth and final T20 cricket match between South Africa and Pakistan at Centurion Park in Pretoria, South Africa, Friday, April 16, 2021. Pakistan beat South Africa by 3 wickets to win the series 3-1. (with 1 ball remaining)(AP PhotoThemba Hadebe)

Pakistan sealed a 3-1 Twenty20 series win in South Africa with a nail-biting victory in the final game on Friday.

Pakistan players watches the video appeal during the fourth and final T20 cricket match between South Africa and Pakistan at Centurion Park in Pretoria, South Africa, Friday, April 16, 2021. (AP PhotoThemba Hadebe)

No. 8 Mohammad Nawaz saw the tourists home, hitting 25 not out from 21 balls at the death, including two crucial sixes in the last two overs.

Pakistan's bowler Muhammad Nawaz jumps for the ball during the fourth and final T20 cricket match between South Africa and Pakistan at Centurion Park in Pretoria, South Africa, Friday, April 16, 2021. (AP PhotoThemba Hadebe)

Batting at No. 3, Fakhar Zaman continued his red-shot form with 60 from 34 balls to put Pakistan on course.

South Africa's batman Rassie van der Dussen watches his shot during the fourth and final T20 cricket match between South Africa and Pakistan at Centurion Park in Pretoria, South Africa, Friday, April 16, 2021. (AP PhotoThemba Hadebe)

Van der Dussen fell in the 14th over when he was caught off a heave out to mid-wicket and that prompted South Africa to fold from 112-3 to 144 all out in the space of six overs.

Pakistan's bowler Haris Rauf attempts fielding his own bowling during the fourth and final T20 cricket match between South Africa and Pakistan at Centurion Park in Pretoria, South Africa, Friday, April 16, 2021. (AP PhotoThemba Hadebe)

More AP sports: https://apnews.com/hub/apf-sports and https://twitter.com/AP_Sports

South Africa's batman Rassie van der Dussen plays a high ball during the fourth and final T20 cricket match between South Africa and Pakistan at Centurion Park in Pretoria, South Africa, Friday, April 16, 2021. (AP PhotoThemba Hadebe)

South Africa's batman Rassie van der Dussen plays a high ball during the fourth and final T20 cricket match between South Africa and Pakistan at Centurion Park in Pretoria, South Africa, Friday, April 16, 2021. (AP PhotoThemba Hadebe)

Pakistan's bowler Haris Rauf celebrates after dismissing South Africa's batman Rassie van der Dussen for 52 runs during the fourth and final T20 cricket match between South Africa and Pakistan at Centurion Park in Pretoria, South Africa, Friday, April 16, 2021. (AP PhotoThemba Hadebe)

Pakistan's bowler Haris Rauf celebrates after dismissing South Africa's batman Rassie van der Dussen for 52 runs during the fourth and final T20 cricket match between South Africa and Pakistan at Centurion Park in Pretoria, South Africa, Friday, April 16, 2021. (AP PhotoThemba Hadebe)

Pakistan's batsman Mohammad Rizwan is stumped for a duck by South Africa's bowler Bjorn Fortuin for a duck during the fourth and final T20 cricket match between South Africa and Pakistan at Centurion Park in Pretoria, South Africa, Friday, April 16, 2021. (AP PhotoThemba Hadebe)

Pakistan's batsman Mohammad Rizwan is stumped for a duck by South Africa's bowler Bjorn Fortuin for a duck during the fourth and final T20 cricket match between South Africa and Pakistan at Centurion Park in Pretoria, South Africa, Friday, April 16, 2021. (AP PhotoThemba Hadebe)

Pakistan's batsman Fakhar Zaman raises his bat to celebrate scoring a half century during the fourth and final T20 cricket match between South Africa and Pakistan at Centurion Park in Pretoria, South Africa, Friday, April 16, 2021. (AP PhotoThemba Hadebe)

Pakistan's batsman Fakhar Zaman raises his bat to celebrate scoring a half century during the fourth and final T20 cricket match between South Africa and Pakistan at Centurion Park in Pretoria, South Africa, Friday, April 16, 2021. (AP PhotoThemba Hadebe)

That ensured a tense finish in the tour finale at SuperSport Park.

Pakistan players celebrate after winning the fourth and final T20 cricket match between South Africa and Pakistan at Centurion Park in Pretoria, South Africa, Friday, April 16, 2021. Pakistan beat South Africa by 3 wickets to win the series 3-1. (with 1 ball remaining)(AP PhotoThemba Hadebe)

Pakistan players celebrate after winning the fourth and final T20 cricket match between South Africa and Pakistan at Centurion Park in Pretoria, South Africa, Friday, April 16, 2021. Pakistan beat South Africa by 3 wickets to win the series 3-1. (with 1 ball remaining)(AP PhotoThemba Hadebe)

No. 8 Mohammad Nawaz saw the tourists home, hitting 25 not out from 21 balls at the death, including two crucial sixes in the last two overs.

Pakistan needed 16 from the last 12 balls and, with the pressure building, Nawaz whipped a six over square leg off the fifth ball of the 19th over, then pulled another six over square leg off the fifth ball of the 20th over. That clinched the win in style with a ball to spare when Pakistan needed two from the last two deliveries.

Pakistan finished on 149-7 in response to South Africa's 144 all out in 19.3 overs.

Pakistan players watches the video appeal during the fourth and final T20 cricket match between South Africa and Pakistan at Centurion Park in Pretoria, South Africa, Friday, April 16, 2021. (AP PhotoThemba Hadebe)

Pakistan players watches the video appeal during the fourth and final T20 cricket match between South Africa and Pakistan at Centurion Park in Pretoria, South Africa, Friday, April 16, 2021. (AP PhotoThemba Hadebe)

Batting at No. 3, Fakhar Zaman continued his red-shot form with 60 from 34 balls to put Pakistan on course.

Pakistan also won the one-day international series for a highly successful tour.

South Africa, 2-1 down and striving to save the T20 series, struggled after being put in to bat, with only Rassie van der Dussen troubling Pakistan with his 52 from 36 balls.

Pakistan's bowler Muhammad Nawaz jumps for the ball during the fourth and final T20 cricket match between South Africa and Pakistan at Centurion Park in Pretoria, South Africa, Friday, April 16, 2021. (AP PhotoThemba Hadebe)

Pakistan's bowler Muhammad Nawaz jumps for the ball during the fourth and final T20 cricket match between South Africa and Pakistan at Centurion Park in Pretoria, South Africa, Friday, April 16, 2021. (AP PhotoThemba Hadebe)

Van der Dussen fell in the 14th over when he was caught off a heave out to mid-wicket and that prompted South Africa to fold from 112-3 to 144 all out in the space of six overs.

South Africa's last eight batsmen contributed just 36 runs between them.

Faheem Ashraf took 3-17 and Hasan Ali 3-40 to lead an outstanding bowling performance by Pakistan that set up the series win.

South Africa's batman Rassie van der Dussen watches his shot during the fourth and final T20 cricket match between South Africa and Pakistan at Centurion Park in Pretoria, South Africa, Friday, April 16, 2021. (AP PhotoThemba Hadebe)

South Africa's batman Rassie van der Dussen watches his shot during the fourth and final T20 cricket match between South Africa and Pakistan at Centurion Park in Pretoria, South Africa, Friday, April 16, 2021. (AP PhotoThemba Hadebe)

More AP sports: https://apnews.com/hub/apf-sports and https://twitter.com/AP_Sports

Pakistan's bowler Haris Rauf attempts fielding his own bowling during the fourth and final T20 cricket match between South Africa and Pakistan at Centurion Park in Pretoria, South Africa, Friday, April 16, 2021. (AP PhotoThemba Hadebe)

Pakistan's bowler Haris Rauf attempts fielding his own bowling during the fourth and final T20 cricket match between South Africa and Pakistan at Centurion Park in Pretoria, South Africa, Friday, April 16, 2021. (AP PhotoThemba Hadebe)

South Africa's batman Rassie van der Dussen plays a high ball during the fourth and final T20 cricket match between South Africa and Pakistan at Centurion Park in Pretoria, South Africa, Friday, April 16, 2021. (AP PhotoThemba Hadebe)

South Africa's batman Rassie van der Dussen plays a high ball during the fourth and final T20 cricket match between South Africa and Pakistan at Centurion Park in Pretoria, South Africa, Friday, April 16, 2021. (AP PhotoThemba Hadebe)

Pakistan's bowler Haris Rauf celebrates after dismissing South Africa's batman Rassie van der Dussen for 52 runs during the fourth and final T20 cricket match between South Africa and Pakistan at Centurion Park in Pretoria, South Africa, Friday, April 16, 2021. (AP PhotoThemba Hadebe)

Pakistan's bowler Haris Rauf celebrates after dismissing South Africa's batman Rassie van der Dussen for 52 runs during the fourth and final T20 cricket match between South Africa and Pakistan at Centurion Park in Pretoria, South Africa, Friday, April 16, 2021. (AP PhotoThemba Hadebe)

Pakistan's batsman Mohammad Rizwan is stumped for a duck by South Africa's bowler Bjorn Fortuin for a duck during the fourth and final T20 cricket match between South Africa and Pakistan at Centurion Park in Pretoria, South Africa, Friday, April 16, 2021. (AP PhotoThemba Hadebe)

Pakistan's batsman Mohammad Rizwan is stumped for a duck by South Africa's bowler Bjorn Fortuin for a duck during the fourth and final T20 cricket match between South Africa and Pakistan at Centurion Park in Pretoria, South Africa, Friday, April 16, 2021. (AP PhotoThemba Hadebe)

Pakistan's batsman Fakhar Zaman raises his bat to celebrate scoring a half century during the fourth and final T20 cricket match between South Africa and Pakistan at Centurion Park in Pretoria, South Africa, Friday, April 16, 2021. (AP PhotoThemba Hadebe)

Pakistan's batsman Fakhar Zaman raises his bat to celebrate scoring a half century during the fourth and final T20 cricket match between South Africa and Pakistan at Centurion Park in Pretoria, South Africa, Friday, April 16, 2021. (AP PhotoThemba Hadebe)