Rafael Nadal ended Tomas Berdych's dreams of qualifying for the last four of the ATP World Tour Finals after edging out the Czech in a final set.
The Spaniard had already sealed his place in the semi-finals of the O2, and required one set to finish top of the group. And when he took the opening set, it seemed as though Berdych was going to be brushed aside fairly quickly.
However, Nadal was on the end of a dominant display from Berdych in the second set, and in less than half-an-hour the contest headed into a decider. But it was Nadal who emerged a 6-4 1-6 6-3 victor to put an end to Berdych's tournament and bring Stanislas Wawrinka into the semi-finals alongside him, who earlier beat David Ferrer to keep his tournament hopes alive.
Nadal meant business right from the beginning of the match as a couple of powerful forehands enabled him to break and go 2-0 in front.
Berdych was managing to hang onto the Spaniard, but Nadal proved to be too strong in the rallies as Berdych in the majority of them dropped the ball short and right into the perfect hitting zone for his opponent.
Nadal came through unscathed towards the end as Berdych missed his opportunity to reclaim the break at 30-30 in the eighth game, and with it Nadal crunched a few more forehands to take the set he needed to guarantee topping the group to avoid Novak Djokovic in the semi-finals.
Berdych was not finished yet as the Czech secured his first break in the second game, and then went on a run of 10 consecutive points to storm into a 5-0 advantage.
Nadal avoided the dreaded whitewash to claim the sixth game - sealed with a volley at the net - but Berdych took the set in an incredible 29 minutes to stun the year-end world No. 1.
The pair held their nerve in the final set by holding serve after seven games, but it was Nadal who ruthlessly broke to go 5-3 up, and consequently finish Berdych off with another sublime forehand up the line.