MELBOURNE, Australia (AP) -- Maria Sharapova and Rafael Nadal put earlier stumbles behind them with convincing wins Sunday to reach the quarterfinals of the Australian Open.

French Open champion Sharapova was broken once in the first set before winning the last eight games of her 6-3, 6-0 fourth-round victory over No. 21-seeded Peng Shuai, advancing her to a showdown with No. 7 Eugenie Bouchard, the most consistent player in women's majors last season.

Seventh-seeded Bouchard won nine of the first 10 games against Irina-Camelia Begu, but lost seven of the next nine to be pushed to a third set for the first time in the tournament.

After serving a double-fault on set point to end the second, Bouchard took a short break before returning to complete a 6-1, 5-7, 6-2 win over No. 42-ranked Begu.

''I gave myself a good, long hard look in the mirror,'' Bouchard explained of her brief absence from Rod Laver Arena. ''I said, `Genie, this is unacceptable.' I really kind of kicked myself in the butt a little bit.''

Nadal's 7-5, 6-1, 6-4 win over towering Kevin Anderson turned on two games at the end of the first set. Nadal fended off five break points to hold, and then broke the 2.03-meter (6-foot-8) tall South African's serve in the next game to go on a roll in his fourth-round encounter. He will next face No. 7 Tomas Berdych, who had a 6-2, 7-6 (3), 6-2 win over local hope Bernard Tomic.

Nadal, who won the Australian Open in 2009 and lost the finals in 2012 and last year, is coming off an extended injury layoff and says he's building momentum as he goes - thankful he got through a tough five-setter in the second round against U.S. qualifier Tim Smyczek.

''The chance to be in the quarterfinals after a tough period of time for me is a fantastic result,'' said Nadal. ''I was playing better than the days before. I felt myself with better rhythm in the legs, better rhythm with my forehand. The way that I improved my level is not the most important thing; obviously the victory is.''

Nadal had to laugh in his last game as he tried to ignore a distraction when his water bottles - famously always precisely placed near the side of the court either for routine or superstition - tumbled over and a ball boy repositioned them.

''Seriously it's not bothering me,'' he said.

Five-time Grand Slam winner Sharapova, coming off a win in the season-opening tournament in Brisbane, had a hiccup in the second round here when she had to save match points against Russian qualifier Alexandra Panova.

Sharapova lost in the fourth round at Melbourne Park last year, when Bouchard reached the semifinals in her tournament debut.

''I feel like something or someone gave me another chance,'' Sharapova said of her second-round reprieve. ''Getting to the quarters is really special.''

Bouchard reached the semifinals or better at the first three Grand Slam tournaments last year, and lost in the fourth round at the U.S. Open. Sharapova lost in the fourth round of three majors in a season highlighted by winning the French Open, where she beat Bouchard in the semifinals.

Sharapova said Bouchard was the most consistent player at the recent Grand Slams, and she had to be at her best to beat the 20-year-old Canadian.

''She's playing really well, confident tennis. So aggressive,'' Sharapova said. ''I have a tough match ahead of me, but I always look forward to that.''

After three straight-sets wins, Bouchard joked that she went three sets against Begu for a couple of reasons.

''Clearly I need more practice!'' she said, then turned to the section of fans known as the Genie Army who support her in Australia. ''It's not horrible playing longer on this court. I just wanted to do that for you guys, and for them to practice more songs.''

In the other quarter of the draw, No. 10 Ekaterina Makarova had a 6-3, 6-2 win over Julia Goerges to reach the last eight, where she'll play the winner of a Sunday night match between No. 3 Simona Halep and Yanina Wickmayer.