Toronto :Roger Federer will return to world number two after reaching the ATP Toronto Masters final by dodging a bullet for the second night in a row, beating Novak Djokovic 6-1, 3-6, 7-5 on Saturday.
The dramatic victory sets up a final against fourth-seeded Scot Andy Murray, who put out Spanish world number one Rafael Nadal 6-3, 6-4.
The final of the 2.4 million-dollar hardcourt event will be a re-run of the Australian Open final won by the Swiss star last January for his lone trophy of 2010.
Federer's Toronto thriller, which took just under two and a half hours, could have gone either way despite a rollicking start from the 16-time Grand Slam champion, who raced away with the opening set in 25 minutes.
But Serbia's Djokovic steadied to find his rhythm in the second set, earning back a break and going ahead 5-3 with a break of two-time Canadian titleholder Federer.
Djokovic eventualy levelled on a set each but Federer again took charge in the third, grabbing a 4-1 lead only to see it eaten away as his first-serving percentage fell and Djokovic dominated in long rallies.
Djokovic clawed back a break in the seventh game for 3-4 and levelled at 5-all.
Federer made his second great escape in 24 hours, after beating Tomas Berdych in the quarter-finals, and broke in the final game from a Djokovic forehand that sailed long.
"It was like yesterday's match. I came out with all guns blazing in the first set," Federer said. "But Novak raised his game and played super-competitive.
"I had the lead in the third set but had to fight in some long rallies. He made it really tough for me. He fought bravely. I'm very happy to be back in the final.
"I wasn't tired at the end and he was looking a bit fatigued. But I know what Novak can do. I came out on the better end tonight and I'm happy."
Federer, now 10-5 in the series against Djokovic, won his squeaker with 11 aces and five breaks of serve while losing his own three times.
"I had a slow start and didn't find my rhythm for the first half hour," said disappointed Djokovic. "I knew Roger would put pressure from the start.
"It was not the best performance from me. Realistically he was the better player. I had too many unforced errors form the backhand. You cannot do that against a player like him. I missed a good chance to go to the final."
Murray's victory lifted him to 4-8 against Nadal after beating the Spaniard at the Australian Open earlier this year but losing to him in a Wimbledon semi-final last month.
"This is a surface I'm most comfortable on," Murray said of the hardcourt as he beat Nadal on the surface for the fourth time in five meetings.
"I enjoy playing aggressive especially against the best players. I want to enjoy playing my game and expressing myself out on court. You never expect to beat the other top players. The margins are so thin.
"I go on court knowing that I have to play my best if I'm going to have a chance of beating them. I like playing Rafa on a hardcourt."
The world number four is searching for his first title of the season after going down to Federer in the Melbourne final and missing his chance for a trophy a fortnight ago against Sam Querrey in the Los Angeles final.
The Scot stands 29-11 on the season and is nine months removed from the last of the six titles he earned in 2009, his November success indoors in Valencia.
Nadal, reigning Roland Garros and Wimbledon champion, lost for only the sixth time this season.
"Overall I'm feeling good. I've won 34 of my last 36 matches and have played well all season," Nadal said.
"It's not a bad start for the hardcourt season. I had chances for the final and I'm not so far off my game. I just need to produce more chances to win."
Murray served two aces in the fifth game of the opening set and broke in the eighth.
He set up set points in a game of three aces, converting on his second winning opportunity from Nadal's error.
Murray won 14 of the last 19 points and fired eight aces as he staked his claim on the victory, his fifth over a world number one.
"Something was not right with my serve," Nadal said. "Andy was playing better than me. My serve was the worst thing about my game today. The rest of it is fine."