MASON, Ohio - Novak Djokovic smacked his racket on the court after losing serve, seemingly headed for another unexplainable loss at a tournament that has eluded him. In the end, he stopped fuming and started playing like the best.

The top-ranked Serb rallied from a 3-0 deficit in the final set to a 6-4, 2-6, 6-3 victory over David Goffin on Thursday, reaching the quarterfinals of the Western & Southern Open.

Eighth-seeded Rafael Nadal lost to fellow Spaniard Feliciano Lopez 5-7, 6-4, 7-6 (3) in an evening match.

Serena Williams moved on to the quarterfinals, losing only two games in her lopsided match.

Djokovic has never won Cincinnati. He's trying to become the first player to win all nine ATP Masters events in a career.

"It was a solid first set, but whatever happened in the next 45 minutes — I don't want to remember it," Djokovic said. "I wasn't on the court. You know, I just lost the intensity and concentration. Luckily for me, I managed to bounce back, dig myself out of this hole I was in."

With things falling apart in the second set, Djokovic slammed his racket three times, drawing a warning. And it kept getting worse against Goffin, a 24-year-old Belgian who is 1-20 against top-10 players. Finally, Djokovic pulled himself together and pulled it out.

Djokovic will face fifth-seeded Stan Wawrinka, who beat him for the French Open title. Wawrinka pulled out a 6-7 (2), 7-6 (5), 7-6 (5) win after Ivo Karlovic double-faulted on match point, his second serve hitting the top of the net.

Nadal, coming off a rain-delayed match that ended at 12:43 a.m., fell behind 3-1 in the third-set tiebreaker and never recovered. Lopez's ace finished off a 2-hour, 24-minute match.

Also, No. 6 Tomas Berdych beat Tommy Robredo 6-0, 6-1 to reach the quarterfinals. He'll face qualifier Alexandr Dolgopolov, who beat Jerzy Janowicz 6-3, 3-6, 6-4 win over Jerzy Janowicz.

On the women's side, Williams needed only 54 minutes to beat Karin Knapp 6-0, 6-2. She lost just 12 points while winning the first nine games.

Williams, the defending Cincinnati champion, is using the tournament as a final tuneup for the U.S. Open, where she'll try to complete a calendar Grand Slam sweep. Her quarterfinals opponent is Ana Ivanovic, who beat Sloane Stephens 2-6, 6-4, 6-1.

Williams beat Ivanovic in straight sets to win her first Cincinnati title last year.

"It will be a really good match for me and kind of test where I am, you know, just in general," Williams said. "Yeah, so I look forward to that."

A right forearm injury forced Swiss teen Belinda Bencic to withdraw after she dropped the first set against seventh-seeded Lucie Safarova. The 12th-seeded Bencic said she didn't think the injury was very serious, but it was too soon to know if she could play in next week's tournament at New Haven, Connecticut. The 18-year-old said her forearm has been sore for some time.

"Every match, it was getting tighter and tighter," she said. "I was hoping that a lot of (therapy) would help, but I couldn't do it."

Bencic was coming off the biggest moment of her brief career. She upset Williams in the semifinals at Toronto last week and went on to win the tournament.

Victoria Azarenka became the fourth woman to withdraw from the tournament when she had to quit her evening match against Anastasia Pavlyuchenkova. Azarenka hurt her upper left leg a few days before the tournament started, and it bothered her as she won the first set 6-1. She quit three games into the second set.

"Such a short period of time before the U.S. Open, it's a little bit dangerous," she said. "I had to unfortunately make that decision. It hurts a little bit because I have been playing so well. Obviously I felt like I had that match in control."

___

AP freelance writer Mark Schmetzer contributed to this report.

___

Follow Joe Kay on Twitter: http://twitter.com/apjoekay