NEW YORK (AP) Roger Federer is impressed by Richard Gasquet’s recent play, one guy with a sweet one-handed backhand appreciating another.

The 17-time major champion remembers what Gasquet did against Federer’s countryman, Stan Wawrinka, in the quarterfinals of the previous major. The Frenchman won the fifth set 11-9 at Wimbledon with the sort of gritty performance he hasn’t been known for in his career.

Now he meets Federer in the U.S. Open quarterfinals Wednesday night.

“I’m not sure if I’ve seen maybe Gasquet play as well as he has right now,” Federer said.

At Wimbledon, the Swiss great added, “He had a good attitude. He was fighting. Good shot selection. It was nice. Now he’s backing it up.”

In last year’s Davis Cup final, Federer beat Gasquet in straight sets to clinch the title for Switzerland, part of his 14-2 record against the Frenchman.

“He kind of went away” is how Federer describes his opponent’s performance that day. At two straight majors now, the 12th-seeded Gasquet is showing signs that won’t happen again.

A one-time teen prodigy who won the U.S. Open junior title at age 16, Gasquet, now 29, is still trying to fulfill that promise.

“I feel like this could be one of the tougher Gasquets I’ve played in previous years,” Federer said, “so I expect it to be difficult.”

The winner of their match will face Wawrinka or Kevin Anderson. Wawrinka is a two-time major champion, while Anderson is making his first Grand Slam quarterfinal appearance after stunning Andy Murray on Monday. Yet the big-serving South African is the one who has won their last four meetings.

“I feel like I’m able – at least I have been in our matches – to stay with him from the back,” Anderson said. “When I’ve been aggressive, I’ve been able to keep him at bay.”

He hopes the U.S. Open fans will embrace him as one of their own. Anderson is working to become an American citizen, though he doesn’t plan to represent the United States in competition. He has lived in the country for a decade – he played college tennis at Illinois – and his wife, a former Illini golfer, is American.

At age 29, Anderson has reached a career-high ranking of 14th. His next opponent is the perfect role model for his faith that he can peak in his early 30s. Wawrinka was almost 29 when he won his first major title at the Australian Open last year. Anderson believes the late start to his pro career saved wear and tear on his body.

“He knows what it takes,” Anderson said of Wawrinka. “He’s been in that position. It’s my first time, but I feel like I’m hitting the ball very well.”

Wednesday’s two women’s quarterfinals pit a player who always seems to thrive at the U.S. Open against one who used to wilt in New York’s late-summer heat.

Two-time Australian Open champ Victoria Azarenka, whose ranking is down to 20th after two injury-plagued seasons, took Serena Williams to three sets in the 2012 and ’13 U.S. Open finals and has been giving some glimpses of that level of play. Her opponent, Simona Halep, may be seeded second, but this is her first quarterfinal at Flushing Meadows.

In the first match, 26th-seeded Flavia Pennetta is in the U.S. Open quarters for the sixth time in seven years. Asked about visiting New York, she said that “for two weeks is perfect. More? No.”

“It’s too crowded,” she explained. “Too much traffic. I am a person for a small city.”

Petra Kvitova would agree – and she has made clear in the past she doesn’t even enjoy two weeks in the big city.

Not that she had ever stayed that long. This is the first U.S. Open quarterfinal appearance for the two-time Wimbledon champ.

She didn’t expect 2015 would be the year to break the drought after she suffered from mononucleosis this summer. Strangely enough, the illness might have contributed to her breakthrough run: She felt less pressure of expectations and less fatigue because she hasn’t been able to practice as much.

And the fifth-seeded Kvitova is working harder to embrace the bustle of the Big Apple. She tweeted a photo Tuesday of herself hailing a cab with the comment: “Do I look like a New Yorker or what?!”

The former top-ranked player and owner of five major titles, including the 2006 U.S. Open, tested positive for the newly banned drug meldonium at the Australian Open in January 2016. That led to a 15-month doping ban, which expired in April.

“Such a special, special tournament, and victory for me, one that I’ll remember forever,” Sharapova said. “Sometimes you never know when it will all come together but it happened to me this week in Tianjin.”

Sharapova displayed resilience as she came from behind in both sets to overcome her 19-year-old opponent.

Sabalenka led 4-1 in the opener and 5-1 in the second before relenting to Sharapova’s greater big-match experience. It was Sharapova’s 36th WTA singles title.

The 30-year-old Sharapova played in her first Grand Slam tournament following the ban at the U.S. Open in August, where she reached the fourth round. Sunday’s result will lift Sharapova up to No. 57 in the world rankings.

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.