Andy Murray saved two match points before Rafael Nadal collected himself enough to scrape through for a 7-6 (7-5), 3-6, 7-6 (8-6) win on Saturday into the final of the ATP World Tour Championships.
Nadal, who lost all three group matches at the event a year ago to limp out, will play on Sunday for the trophy against either Novak Djokovic or Roger Federer.
"It was a fantastic match, I'm very happy to beat a great champion like Andy," said Nadal. "it was an amazing victory. It was a really difficult match against one of the best players of the world.
"His level is unbelievable almost always. If he plays like this, I don't have any doubt he is going to have big chances to win very important titles."
Murray showed grit from the start of an inspired contest in front of a home crowd of 17,000, hanging tough with his Spanish opponent who owns three of the four Grand Slam titles this season.
"It was a great match, I think both of us played very well," said the Scot who will move back to fourth in the world to end the season. "I probably played one bad game the whole match, or maybe just a couple of bad points."
"It was great tennis - but I'm disappointed to lose."
Murray saved a match point in the ninth game of the final set in what turned into a three-hour, 11-minute epic, holding serve for 4-5 and breaking the Spanish world number one a game later as Nadal served for victory.
The tension notched up, with Murray reaching 6-5 with his 20th and 21st aces in the game before Nadal brought on a tiebreaker.
Even at that late point nothing was decided, with Murray going up a double mini-break 3-0 as he began with another ace only to see Nadal claw back from 4-1 down.
Murray saved another Nadal match point from a Spanish backhand error before sending a return wide. That error - Murray struck more than 50 winners on the marathon afternoon - put Nadal into winning position for the third time.
The Spaniard finally ended the drama with a ripping forehand cross-court into the corner.
"Even when I was losing 4-1, 3-0 in the final tiebreak, I was happy," said Nadal "I was saying, just try to be there, because there is always a chance for me.
"I was really happy because I was playing a great match. Even if I lose, I had a fantastic season.
"If I lose against Andy playing like this, just congratulate him, go home be very happy for everything, and practice for next year."
Added Murray, who will train in the Florida heat of Miami in December: "I want to build on this (level) for next year (2011). It was a great match to finish the year."
"But I need to improve because I'm competing with the two best players (Nadal and Federer) of all time. So if I want to win these tournaments, I want to win the Grand Slams, I need to get better."
Nadal improved his record against Murray to 9-4 after losing their last match in Canada during the summer following a Wimbledon semi-final win for the Spaniard.
Nadal holds winning records over both Federer (14-7) and Djokovic (16-7), defeating the Serb this week in group play at the year-end event.