Novak Djokovic, of Serbia, reacts during a match against David Goffin, of Belgium, at the Western & Southern Open tennis tournament, Thursday, Aug. 20, 2015, in Mason, Ohio. (AP Photo/John Minchillo)


Novak Djokovic, of Serbia, serves to David Goffin, of Belgium, during a match at the Western & Southern Open tennis tournament, Thursday, Aug. 20, 2015, in Mason, Ohio. (AP Photo/John Minchillo)


David Goffin, of Belgium, returns the ball to Novak Djokovic, of Serbia, during a match at the Western & Southern Open tennis tournament, Thursday, Aug. 20, 2015, in Mason, Ohio. (AP Photo/John Minchillo)


AP Sports Writer

Eds: Updates with detail, comment. Adds photos. With AP Photos.

MASON, Ohio (AP) — Novak Djokovic smacked his racket on the court after losing serve, seemingly headed for another unexplainable defeat at the 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-1 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.

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.

Djokovic will next 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.

Wawrinka had to overcome 35 aces by Karlovic to reach the quarterfinals for the second straight year.

Also, qualifier Alexandr Dolgopolov reached the quarterfinals with a 6-3, 3-6, 6-4 win over Jerzy Janowicz. Dolgopolov had never made it past the first round in four previous Cincinnati appearances.

On the women’s side, 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.

“I wasn’t 100 percent, and to beat Lucie or even compete against her, you have to be 100 percent,” she said. “I didn’t want to retire. This was the first I’ve ever had to retire. I hope it gets better.”

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 top-seeded Serena Williams in the semifinals at Toronto last week and went on to win the tournament.

___

AP freelance writer Mark Schmetzer contributed to this report.

___

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

Novak Djokovic, of Serbia, reacts during a match against David Goffin, of Belgium, at the Western & Southern Open tennis tournament, Thursday, Aug. 20, 2015, in Mason, Ohio. (AP Photo/John Minchillo)
http://aimmedianetwork.com/wp-content/uploads/sites/22/2015/08/web1_105342623-5ecfd27f95fd470f8993cfd0f210bf93.jpgNovak Djokovic, of Serbia, reacts during a match against David Goffin, of Belgium, at the Western & Southern Open tennis tournament, Thursday, Aug. 20, 2015, in Mason, Ohio. (AP Photo/John Minchillo)

Novak Djokovic, of Serbia, serves to David Goffin, of Belgium, during a match at the Western & Southern Open tennis tournament, Thursday, Aug. 20, 2015, in Mason, Ohio. (AP Photo/John Minchillo)
http://aimmedianetwork.com/wp-content/uploads/sites/22/2015/08/web1_105342623-bc48686a771e41149cfccc8c8f710364.jpgNovak Djokovic, of Serbia, serves to David Goffin, of Belgium, during a match at the Western & Southern Open tennis tournament, Thursday, Aug. 20, 2015, in Mason, Ohio. (AP Photo/John Minchillo)

David Goffin, of Belgium, returns the ball to Novak Djokovic, of Serbia, during a match at the Western & Southern Open tennis tournament, Thursday, Aug. 20, 2015, in Mason, Ohio. (AP Photo/John Minchillo)
http://aimmedianetwork.com/wp-content/uploads/sites/22/2015/08/web1_105342623-d0eefa9d8eb440bda9b596f6bf0cd463.jpgDavid Goffin, of Belgium, returns the ball to Novak Djokovic, of Serbia, during a match at the Western & Southern Open tennis tournament, Thursday, Aug. 20, 2015, in Mason, Ohio. (AP Photo/John Minchillo)