Updated

Novak Djokovic fought back after losing the first set to beat Marcos Baghdatis 2-6, 6-2, 6-3 in the Swiss Indoors quarterfinals on Friday.

The top-ranked Serb stayed on course to meet hometown favorite Roger Federer in the final for a third straight year after the defending champion beat American Andy Roddick 6-3, 6-2.

Djokovic had his serve broken twice early on before recovering to seal a victory that improved his record against Baghdatis to 6-0 and raised his overall 2011 record to 67-3.

"I started slowly, no life on the court, and he took his chances," said Djokovic, playing his first tournament after a six-week break to heal a back injury. "My body is still getting used to this competition mode. I have to stay patient."

The U.S. Open, Wimbledon and Australian Open champion will play 32nd-ranked Kei Nishikori of Japan in Saturday's semifinals. Nishikori beat Mikhail Kukushkin of Kazakhstan, 6-4, 5-7, 6-4 in a match that featured 13 breaks of serve.

Federer will play his 2008 Beijing Olympics gold medal-winning doubles partner Stanislas Wawrinka. The Swiss No. 2 eased past Florian Mayer of Germany 6-2, 6-2.

In beating Roddick at Basel for the fourth time, Federer improved to 21-2 against the 2003 U.S. Open winner. He cruised after breaking Roddick's serve to lead 5-3 in the first set.

"It's great to get those big momentum shifts going sometimes. It was a good performance from my side," said Federer, also returning after six weeks off.

Roddick's pay check this week raised his career tournament earnings over $20 million.

Djokovic came to Basel having not played since Sept. 18, and was pushed to three sets for the second time in three matches.

"It's nothing I didn't expect, but I'm winning matches and that is what matters most," Djokovic said.

The 59th-ranked Baghdatis broke the top-seeded Djokovic's serve and had six aces in dominating the first set.

Djokovic broke through for a 4-2 lead in the second after the Cypriot double-faulted.

Djokovic commanded the rest of the match, sealing it in exactly one hour less than Nishikori's two-hour, 39-minute effort.

Neither Nishikori nor 113th-ranked Kukushkin could land half of their first serves, however, the 21-year-old Japanese took his first match-point chance with just his second ace.

With his three victories in Basel, Nishikori will rise to a career-best ranking and highest by a Japanese man. He had been No. 30 after reaching the Shanghai Masters semifinals last month.

"It's a great feeling. A great experience for me," said Nishikori, who lost his only meeting with Djokovic at the 2010 French Open. "(Novak) is playing on a different level. I am going to try to be more aggressive than usual."