LONDON -- Former champion Maria Sharapova is back in the semifinals at Wimbledon for the first time in four years, but not without a little drama 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, 6-7 (3), 6-2 and advance to her 20th Grand Slam semifinal.

It took 2 hours, 46 minutes for Sharapova to subdue Vandeweghe, 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.

After the match, Vandeweghe accused Sharapova of poor sportsmanship for continuously moving around after Vandeweghe had started her service motion and said she twice talked to the umpire about it during the match.

"She was moving around in the middle of my motion on my second serve," Vandeweghe said. "[The umpire] said she didn't believe she was doing it during the motion. I strongly disagreed. Toward the later end of the second set, I said if she has a problem speaking to Maria, if she's too scared to do it, I had no problem speaking to her."

Maria Sharapova was accused Tuesday of poor sportsmanship for moving around during Coco Vandeweghe's service motion. Sharapova won the match to advance to the Wimbledon semifinals. GLYN KIRK/AFP/Getty Images

She said the umpire did not say anything to Sharapova, and Vandeweghe said she also did not address Sharapova directly during the match.

"What I experienced, what I felt from her moving around in between my serving motion was not, I don't think, sportsmanlike, in my opinion," Vandeweghe said. "I try to play as fair as I can. You know, when I felt like it wasn't being reciprocated, that's when I spoke with the umpire for her to deal with."

Sharapova said she was unaware there were any issues during the match and that she was never told anything by the umpire or Vandeweghe.

"I mean, it is what it is," Sharapova said when told of Vandeweghe's accusations. "What she said, I'm not going to argue against her words."

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 Vandeweghe 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.

"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 five-time champion Serena Williams, who defeated Victoria Azarenka to advance, on Centre Court on Thursday.

"Definitely no secrets between each other's games,'' she said. "That would be an incredible moment for me to step out on Centre Court against her again.''

Advancing in the bottom half of the draw was 13th-seeded Agnieszka Radwanska of Poland, who beat Madison Keys of the United States 7-6 (3), 3-6, 6-3 to reach the semifinals here for the third time in four years.

Radwanska lost to Williams in her only major final at the All England Club three years ago, but followed it up with another semifinal run at Wimbledon in 2013. Last year, Radwanska lost in the fourth round.

Radwanska will face No. 20 Garbine Muguruza, 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 past two French Opens.

The Associated Press contributed to this report.