LONDON - Former champion Maria Sharapova is back in the semifinals at Wimbledon for the first time in four years after a three-set battle against an American making her Grand Slam breakthrough.

The fourth-seeded Sharapova was pushed hard on Centre Court by 47th-ranked CoCo Vandeweghe but lifted her game in the third set to win 6-3, 5-7 (3), 6-2 and advance to her 20th Grand Slam semifinal.

Defending men's champion Novak Djokovic, meanwhile, survived a one-set shootout with big-serving Kevin Anderson to advance to the men's quarterfinals and keep up his bid for a third Wimbledon title.

It took 2 hours, 46 minutes for Sharapova to subue Vandweghe, who had never previously progressed past the third round at a major but made the most of her appearance on the biggest stage in the game. The 23-year-old American repeatedly waved her arms to rouse the crowd.

Sharapova served for the match at 5-4 in the second set but couldn't close it out. When Vandeweghe won four straight points to take the second-set tiebreaker, it was the first time that Sharapova had dropped a set all tournament.

The Russian buckled down and went up 3-0 in the third set. When Vandweghe broke to close to 3-2, she again motioned to the crowd to get behind her. But Sharapova shut down the comeback, winning the final three games.

advertisement | advertise on newsday

"I was pretty dominant in the first and the beginning of the second set and things slipped away a little bit for me in that second set tiebreaker, serving for the match," Sharapova said.

The All England Club is where Sharapova won her first Grand Slam -- and only Wimbledon title so far -- in 2004 at the age of 17. But this will be her first trip back to the semifinals since 2011, when she lost in the final to Petra Kvitova.

"It's been a while since I've been at that stage so I'm really happy with every match that I've competed out here and been able to win some in two sets, and today in three," Sharapova said. "I'm just through so that gives me a lot of confidence."

Sharapova will next play the winner of the other quarterfinal on Centre Court between five-time champion Serena Williams and Victoria Azarenka.

Advancing to the semifinals in the bottom half of the draw was 20th-seeded Garbine Muguruza of Spain, who beat Timea Bacsinszky of Switzerland 7-5, 6-3 on Court 1. It will be the first Grand Slam semifinal for the 21-year-old Muguruza, who reached the quarterfinals at the last two French Opens.

@Newsday

Muguruza will face either Agnieszka Radwanska or Madison Keys in the semifinals on Thursday.

The top-ranked Djokovic beat the 14th-seeded Anderson 7-5 in the fifth set on Court 1 to complete a match that had been suspended by darkness at two sets apiece.

It took 45 minutes of play Tuesday for Djokovic to advance to his 25th consecutive Grand Slam quarterfinal with a 6-7 (6), 6-7 (6), 6-1, 6-4, 7-5 victory. He will next face Croatia's Marin Cilic, a player he has beaten in all 12 of their previous matches.

Djokovic struggled throughout the match in trying to tame the 6-foot-8 (2.03-meter) Anderson's huge serve, but broke him to go up 6-5 in the fifth set to set up his victory.

"I find that this was one of the most difficult matches I've played at Wimbledon, maybe in my career," Djokovic said. At times, I was really helpless with my return."

advertisement | advertise on newsday

Anderson finished with 40 aces, including three in the first game of the fifth set and eight overall in the decider.

But it was two consecutive double-faults by Anderson that proved crucial, leaving him 15-40 down in the 11th game. Djokovic took advantage on the first break point, hitting a forehand return that dropped sharply at Anderson's feet and forced an error.

Djokovic served out the match in the next game, completing the men's quarterfinal lineup.

In the other matches Wednesday, seven-time champion Roger Federer will play No. 12 Gilles Simon, 2013 champion Andy Murray will face Vasek Pospisil, and French Open winner Stan Wawrinka will be up against No. 21 Richard Gasquet.

With the loss, Anderson became the first player in the Open era to reach the fourth round at Grand Slam tournaments seven times without ever advancing to the quarterfinals.

advertisement | advertise on newsday

"Coming into this week, it was definitely my goal to progress further than I have at the Slams," Anderson said. "Been in the Round of 16 a few times. Came a lot closer this time than I have in the past. But just wasn't close enough."