After storming out to a 5-2 lead straight out of the gates, and holding two set points in that game, Sharapova was made to work for the first set, with Diyas - who was just one spot out of being seeded here - fighting those set points off and winning the next few games before finally succumbing, 6-4.
Diyas came out firing in the second set, going up 3-1 and even holding a point for 4-1, but once again Sharapova hung tough, the No.4-seeded Russian winning five of the next six games to end it, 6-4, 6-4.
"Looking back at last year's match against Kerber, it was a tough three-setter, a very physical match, and I didn't come through," Sharapova said. "Of course you always think back, think about what could have happened if you'd managed to win a few of those points, and how far you could have gone.
"Obviously, being back in the situation of the fourth round at Wimbledon, I tried to put all of my effort to get further," the Russian continued. "And as we all know, it will only get tougher from here."
The other surprise about the result? Vandeweghe's thoughts on how she played.
"I didn't really feel that good. I thought it was one of the worst matches that I've played the whole tournament so far," the American said in her post-match presser. "Serve was kind of in and out. It was there when I needed it, especially towards the end, but I think it was more my court positioning early on. I thought I was too far back, letting her dictate instead of making her feel my presence.
"But other than that, I kept calm and cool. So I think that helped. When the tougher, longer rallies happened, I was on the winning end of it more times than I wasn't. I think that was the difference."
Sharapova and Vandeweghe will be playing against each other for the first time.
"I think it's been a tremendous effort for her to get to this stage," Sharapova said. "Her game really revolves around that serve, and she's been using it quite effectively in her previous four matches.
"It's always tricky playing against a really good server on grass, because a few points here and there can ultimately tell the difference in the winner and the loser. But I'm looking forward to that match-up."