SHANGHAI (AP) Roger Federer extended his winning streak over Rafael Nadal this year to four matches after beating the top-ranked Spaniard 6-4, 6-3 to win the Shanghai Masters on Sunday.

The Swiss 19-time grand slam winner, who still trails Nadal 23-15 in their overall head-to-head record, didn’t face a break point and started and ended the match with service breaks.

“I don’t know what my expectations were going in,” Federer said. “I thought I might struggle early on because it was a late finish last night.

“I had no nerves before the match, surprisingly. I think I was pretty clear about how I wanted to play the match. I started off very well and relaxed from then on.”

Despite his dominance in 2017, Federer doesn’t rate his chances of catching Nadal in their head-to-head record.

“It’s not going to happen. We don’t have enough years left on the tour. We ranked too good so we play each other only in finals at the moment… You can’t win them all against Rafa, to be honest. He’s too good of a player,” Federer said.

Federer took advantage of three of seven break point opportunities in the match to snap Nadal’s 16-game winning streak, which included his China Open victory last week.

Federer, who has won the last five encounters between the pair dating back to the 2015 Basel final, also beat Nadal in the Australian Open final, a round of 16 match at Indian Wells and the Miami final this year.

“Have been a very difficult match for me,” Nadal said. “He played very fast and he played well.

“Of course was not the best match for me of the week. When somebody plays better than you, sport is not very difficult. That’s the real thing, no? When you play against somebody that is better than you in most of the things that really matters in this sport, in this kind of surface, then it’s tougher.”

The Shanghai Masters is Federer’s 94th career title, moving him into a tie with Ivan Lendl in second place on the Open era list.

Nadal arrived on court with a bandage under his right knee, the same leg he twice smacked with his racket after losing his serve for the first time this week in the semifinal.

Federer said he was surprised to see the wrap and didn’t feel Nadal was struggling with his movement.

In his post-match press conference, Nadal elected not to discuss the knee injury, saying, “I don’t want to talk about that now, sorry, but after losing final is not the moment.”

When asked if he would play upcoming tournaments in Basel, Switzerland and Paris, Nadal refused to confirm his participation.

Federer took advantage of a third break point in the first game of the match with a winning backhand passing shot. He broke Nadal’s serve again on a second break point in the fifth game of the second set when Nadal sailed a backhand crosscourt wide. In the final game, Nadal netted a forehand at 15-40 to end the 72-minute match.

SHANGHAI — Rafael Nadal and Roger Federer will face each for the 38th time after advancing Saturday to the Shanghai Masters final.

Top-seeded Nadal defeated Marin Cilic of Croatia 7-5, 7-6 (3) in the first semifinal, and second-seeded Federer was stretched to three sets before posting a 3-6, 6-3, 6-3 win over Juan Martin del Potro of Argentina.

Nadal, who won a tour-best sixth title of the season at the China Open last week, improved his current winning streak to 16 matches. The Spaniard, who has 16 Grand Slam men’s singles trophies, won the French and U.S. Open titles this season.

Federer, looking for his sixth title this year, won the Australian Open and Wimbledon this year to increase his Grand Slam men’s singles record to 19 titles.

Nadal holds a 23-14 winning record over Federer, but Federer has won their last four meetings, including all three this season. Nadal has won 14 of 23 finals against Federer.

“I’m not sure what the stat is because most of them, half of them, maybe, were in finals and that’s why the rivalry is so special,” Federer said. “I enjoy playing against him even if the head-to-head is not in my favor. He’s one of the guys who’s made me a better player. I don’t want to thank him for that, but it made me go back and rework my game.”

Del Potro went for an MRI on Friday night after falling and hurting his left wrist but showed little sign of the injury bothering him against Federer. The Argentine said his wrist was hurting after the match.

Federer, who lost in the quarterfinals to del Potro at the U.S. Open this year, looked shaky in the opener but found his form for the final two sets. He broke 16th-seeded del Potro on a fifth break point in a contentious sixth game of the second set. When Federer missed out on the fourth break point, the Swiss hit a ball in anger across the court. During the changeover after the seventh game, an annoyed del Potro asked why Federer wasn’t given a warning for the outburst.

“Getting that break and then holding is always key … especially with all the twists and turns in tennis,” Federer said. “If you blink at the right time your back can be against the wall.”

Nadal, who was a finalist here in 2009, has now beaten Cilic in five of their six matches.

Nadal hadn’t lost his serve in 32 service games but fourth-seeded Cilic broke him twice, in the sixth and 10th games of the second set.

At 30-40 in the sixth game, Nadal netted a forehand volley to surrender his serve for the first time, and responded by twice angrily banging his racket on his leg, just above the knee.

“Is true, sometimes I get frustrated too,” Nadal said.

Nadal failed to take advantage of his first match point when he made a forehand error at 40-30 in the 10th game, and went on to have his serve broken.

Leading 6-3 in the second-set tiebreaker, Nadal prevailed on his second match point when Cilic netted a service return.

Nadal said there were “mistakes with my serve in the second, that’s the only thing. For the rest, I am happy.”

Nadal saved three set points on his own serve when 5-4 down.

The Shanghai Masters wants to expand to a 10 or 11 day event, increase its draw size from 64 to 96, and raise prize money to more than $10 million, starting in 2019.

Del Potro required four match points – two on Zverev’s serve in the ninth game, two on his own serve in the 10th game – to win this first encounter against the German.

Del Potro, who lost his serve for the only time in the match in the second game, won nine of his 15 service games at love.

Zverev, in the hunt for a sixth ATP title of the season, lost his composure after netting a backhand to surrender his serve in the fifth game of the third set to the Argentine. He repeatedly smashed his racket until it was a mangled mess.

“For me, it’s impossible to lose a match when I’ve only been broken one time,” Zverev said. “The game where he broke me I was up 40-15 and I was just unfocused there.”

Del Potro knew Zverev’s reaction to losing serve was likely a good omen.

“I saw his frustration, for sure,” del Potro said. “He’s still very young and has to keep learning. He has everything to be in the top of the game.”

Del Potro will John Isner of the U.S. or Viktor Troicki of Serbia in the last eight on Friday.