Abdul Razzaq smashed a whirlwind century to single-handedly lead Pakistan to a one-wicket victory over South Africa in Abu Dhabi.
The all-rounder, who came to the crease with his side reeling at 136 for five in pursuit of 294, blasted 10 sixes and seven fours in an unbeaten 109 from 72 balls to help his side square the series at 1-1.
Earlier Colin Ingram made exactly 100 and had good support from Hashim Amla (65) and JP Duminy (54) as the Proteas set a testing target at the Sheikh Zayed Stadium.
And they looked on course to defend that target for most of the game after Shahid Afridi (49) and Fawad Alam (48) gave them outside hope.
Still, though, victory was looking increasingly unlikely with 53 needed from the last four overs, but Razzaq produced some sublime hitting to take his side over the line.
It was the same old story for Pakistan at the top of the order as they slumped to 31 for two after losing Asad Shafiq (one) and Younus Khan (18).
Misbah-ul-Haq and Mohammed Hafeez gradually tried to rebuild as they took their team past 50 in the 14th over, but they were again jolted when the former was trapped leg before wicket by Robin Peterson for 17.
Hafeez, the other set batsman, was next to go as he attempted to cut Johan Botha and nicked to AB de Villiers behind the stumps for 30.
That made it 70 for four and Pakistan's batting again struggling against disciplined bowling from the South Africans.
Afridi tried to stem the flow of wickets when he arrived at the crease, succeeding initially as he and Fawad put on 50 for the fifth wicket.
The captain, who has been throwing his wicket away easily in recent games, for a while mixed some of his usual aggression with more responsibility but still fell to a poor shot off Lonwabo Tsotsobe and was caught by Ingram running in from long-on.
Then came a key partnership between Razzaq and Fawad once they came together in the 30th over.
They put on 50 in 59 balls before taking their side past 200 in the 40th over when the batting powerplay was taken.
The acceleration continued as they began to tip the scales in Pakistan's favour, but Fawad then handed Charl Langeveldt his 100th ODI scalp when he pulled him straight to extra cover with 70 needed from 50.
Zulqarnain Haider (six) was cheaply run out but Razzaq smashed the 47th over from Langeveldt for 20 to keep his side's hopes alive.
Two further run-outs - Wahab Riaz and Saeed Ajmal - spelt further trouble for Pakistan, but Razzaq kept his cool by cleverly farming the strike.
He was especially brutal on Langeveldt and Albie Morkel and, with fourteen needed from the last over to be bowled by the all-rounder, Razzaq had little trouble in reaching the target and claiming his third ODI hundred in the process to seal a famous win.
Earlier South Africa, who left out Graeme Smith (finger) and Jacques Kallis (dehydration), won the toss and elected to bat first.
They lost Peterson, the man who replaced the captain, for six after he was bowled by Razzaq, but Amla and Ingram took them past 50 in the 10th over with the opener soon reaching his half-century from 47 deliveries.
The 100 came up in the 20th over with the two batsmen looking comfortable against the seamers, before the introduction of Afridi ended the partnership on 84 - Amla trapped leg before wicket.
Ingram dropped anchor at the other end, reaching 50 from a more patient 72 balls, with De Villiers providing good support in an 86 stand that came in just over 15 overs.
The partnership eventually ended when the wicketkeeper was bowled by Afridi for 29, leaving South Africa on 194 for three.
Duminy was next in and watched his partner reach the three-figure mark from 118 deliveries.
He was out next ball, though, trapped lbw by an inswinger from Riaz, who was in the team ahead of Umar Gul, just as the batting powerplay was taken.
The left-arm seamer then took a return catch to remove David Miller (six) and reduce the visitors to 232 for five after 43 overs.
They were in further trouble when Morkel (one) was cleaned up by Hafeez, but Duminy's 43-ball knock took them to 286 for eight - a target that Razzaq helped Pakistan to overhaul with the third game set for Dubai on Tuesday.