ICC World Twenty20 semi-final:
Pakistan 149-4 beat South Africa 142-5 by seven runs
Highlights - Afridi inspires Pakistan to victory (UK users only)
Shahid Afridi put in a stirring all-round performance as Pakistan toppled tournament favourites South Africa in the first World Twenty20 semi-final.
Afridi blitzed 51 off 34 balls and then removed batsmen Herschelle Gibbs and AB de Villiers in his first two overs to pick up terrific figures of 2-16.
And although Pakistan's 149-4 did not look enough, South Africa eventually finished seven runs adrift on 142-5.
Jacques Kallis hit a valiant 64 off 54 balls but there was scant support.
After the agonies of their failed World Cup campaigns in the 50-over format in 1999, 2003 and 2007, South Africa had again failed to do justice to their talents when it really mattered.
They had gone into the Trent Bridge showdown unbeaten in the tournament, while Pakistan had played dreadfully in their opener - losing by 48 runs to England - and had also been comfortably beaten by Sri Lanka.
There were times when South Africa had the upper hand, particularly towards the end of Pakistan's innings and in the early stages of their chase. But Afridi's spell changed everything - and Umar Gul's yorkers at the business end of the contest closed the deal.
Pakistan's batsmen blazed away freely early on and after the second ball of the third over had advanced to a dangerous 28-1.
Kallis batted beautifully but the support was not there
But Kamran Akmal perished after an explosive 23, top-edging Dale Steyn to mid-on, and Shoaib Malik was a slow starter. So despite Afridi's three boundaries, a six-over start of 47-2 was not as good as it might have been.
Four overs later, with the half the overs in the innings used up, tenacious South African fielding - and accurate bowling - had limited the score to 68-2.
But Afridi now tucked into the off-spinner Johan Botha, hitting four off-side boundaries in succession. The first three were hit inside out through the covers, with the last delicately steered past the short third-man.
It was Graeme Smith's third spinner, and seventh bowler in all, who delivered a vital breakthrough, when Afridi attempted to mow Jean-Paul Duminy's first ball, and top-edged meekly to midwicket.
But Duminy's second over went for two fours, Malik depositing him over extra cover and Younus Khan, new to the crease, unfurling a delectable reverse-sweep.
Smith persisted with his first-choice spinner of three, Roelof van der Merwe, and the slow left-armer had Malik caught at long-off.
Pakistan now needed one or two really big overs at the death to take themselves up to a big score, but Younus and Abdul Razzaq had to be content with singles and the occasional two.
Bowling yorkers, and the occasional bouncer, Steyn and the 19-year-old Wayne Parnell produced exhibition stuff over the last four overs. None of the last 32 balls yielded a four or a six and the last five overs went for just 29.
Pakistan looked a little bit flat in the field when South Africa began their chase. Kallis was moving through the gears smoothly and Gul then failed to lay a hand on a skier offered by Smith, thumping the back of his head on the ground for good measure.
Such an error may have proved critical, but Smith top-edged another pull, and the 17-year-old left-armer Mohammad Aamer took the catch comfortably off his own bowling.
The next act of an intriguing drama came when Pakistan's spinners took to the field, and they were admirably led by Afridi.
Gibbs failed to read a top-spinner and was clean bowled, before De Villiers, South Africa's top batsmen in the tournament, chopped an attempted cut onto his stumps.
Kallis could no longer play within his comfort zone, with the required rate soaring and Duminy unable to get out of the blocks quickly.
South Africa needed 77 from the last seven overs, and got 10 off Gul's first when Pakistan's specialist death bowler did not quite hit his lines initially.
Perplexingly, Younus then opted for a seventh bowler in young Fawad Alam, but the slow left-armer was bullied for a Kallis four - and then a six - and suddenly South Africa were back in the hunt.
But Gul stormed back, with reverse-swing and yorkers aplenty, to give up just six runs in his second over, and that left 39 needed off the last three overs.
Only sixes would do now, but Kallis skied Saeed Ajmal to long-on, and the game was all but up. Gul kept Duminy and Albie Morkel to singles in the penultimate over, leaving Aamer the luxury of bowling the last with 23 wanted.
Sri Lanka are favoured to win their semi-final against West Indies at The Oval on Friday, but on the basis of this upset few will write off Chris Gayle's men.