SHANGHAI, China -- Two-time defending champion Andy Murray beat Roger Federer in a rain-affected semifinal Saturday to set up a rematch of the U.S. Open final against Novak Djokovic at the Shanghai Masters.

Djokovic moved into his 10th final of the year by beating fourth-seeded Tomas Berdych 6-3, 6-4 in the earlier semifinal.

Murray broke Federer in the fifth game of the first set but then wasted seven break points in the first game of the second, as the top-ranked Swiss managed to hold serve before a brief rain delay interrupted the match.

But Federer couldn't stave off Murray as he again broke to go up 3-2, but the U.S. Open champion had to endure one more rain delay before serving out the match.

The players went off the court for about 30 minutes at 5-4, while organizers closed the eight-petal magnolia-shaped roof. When play resumed, Murray only needed five points to finish off the match.

Djokovic is looking for his fifth title of the year and second straight after winning in Beijing last week.

Against Berdych, he hit 25 winners and converted all three of his break points to improve his head-to-head record against the Czech player to 10-1.

It was Djokovic's tour-leading 69th victory of the year.

"Movement today was very important from my side, to be on a very high level so I can try to get into the longer rallies where I find more chances on my side to win the rallies," Djokovic said. "(I) played tactically right. I was putting a lot of returns into the court, making a lot of pressure on his serve."

Djokovic rushed out to a 5-1 lead in the first set, but when serving for the set at 5-2 was broken for the only time in the 1 hour, 25 minute-long match.

In the second set, Djokovic broke Berdych's serve in the third game and carried that advantage to win the match.

"First of all I need to give credit to Novak, he started really like a champion," Berdych said. "He started really, really great, and didn't give me a chance at all."