Toronto :Roger Federer orchestrated a fightback from 2-5 down in the last set to rescue a 6-3, 5-7, 7-6 (7-5) victory over nemesis Tomas Berdych for a place in Saturday ATP Toronto Masters semi-finals.
The third-seeded Swiss had lost twice this season to Czech seventh seed Berdych, in Miami and in a Wimbledon quarter-final barely six weeks ago.
Revenge was sweet, though, as Federer put a polite gloss on his victory after two hours and 40 minutes.
"It was a great match, but Tomas also played his role," Federer said.
Success in the struggle keeps Federer alive as he plays his first tournament since Wimbledon. He faces the winner of a later match between Serbian world number two Novak Djokovic and French challenger Jeremy Chardy.
Should Djokovic go through, it would mark the first time since 1987 that the top four seeds in Canada had reached the final four.
Berdych may have been feeling nerves as he failed to serve out while leading 5-3 in the final set. Instead Federer finally came good after four break points in the game, with his opponent sending a backhand into the net.
As it went to a tiebereak, Federer raced to 4-0, produced three mistakes in a row but recovered to set up a match point and advance as Berdych returned long.
"Serving it out is never easy, even for the top guys," said Federer, whose lone title this season came at the Australian Open. "He missed a couple of forehands and that made the difference.
"There was a lot of work on my side. This is the kind of close match I was losing early in the year. It was tough. I couldn't take a lot of confidence from that. You sometimes find yourself on the practise court when you hope to have been playing a match.
"But I won tonight and I now have a chance for tomorrow."
Top seed Rafael Nadal won 10 points in a row late in the match to beat Philipp Kohlschreiber 3-6, 6-3, 6-4 to set up a semi with holder Andy Murray.
Nadal, off the boil in the opening set, managed to right the ship by winning the second and taking the third thanks to a break in the seventh game against an opponent he has now defeated seven times.
Nadal has now defeated the German three times in 2009 and stands 34-1 since the second week of April. Nadal struggled to conclude his 50th match win of the season, passing that mark for a sixth straight year.
Kohlschreiber, who spent a recent practise week with Federer, fired 11 aces against four for Nadal, but could not find a first serve, a deadly error against the Spaniard.
"I started terrible, but he's difficult to beat," said Nadal. "It's a good victory for me, especially as I finished playing better in the third.
"Reaching the semis is very good news for me in the very first tournament on hard after one month and a half without competition."
Britain's Murray turned in an impressive performance to end the 11-match win streak of Argentina's David Nalbandian with a 6-2, 6-2 victory.
Murray called the victory perhaps his best effort of a season in which he has yet to lift a title after winning a leading six in 2009.
"It was very good, I served well today and got the first good hits in in a lot of the rallies," said Murray. "I was able to dictate a lot of the points.
"It was a very good performance. It was one of the best matches I've played this year."