STUTTGART, Germany (AP) Sam Groth of Australia rallied to upset third-seeded Feliciano Lopez 3-6, 7-6 (5), 7-6 (6) in the second round of the Mercedes Cup on Wednesday.

The 66th-ranked Groth fired 19 aces to defeat the Spaniard in two hours, seven minutes and book a quarterfinal with eighth-seeded Viktor Troicki, who was also made to work hard before beating German wild card Alexander Zverev 6-3, 6-7 (6), 6-3.

''I think it definitely should have been easier,'' said Troicki, who reached his fourth quarterfinal of the season. ''I was a set and a break up and didn't continue playing a good level. He used it and started playing better. The crowd gave him a bit more support.''

Also Wednesday, fourth-seeded Gael Monfils of France shot 18 aces to defeat Andreas Haider-Maurer of Austria 7-6 (6), 7-6 (5) for a quarterfinal with sixth-seeded German Philipp Kohlschreiber.

Kohlschreiber defeated Jerzy Janowicz of Poland 6-4, 6-4.

Rafael Nadal is top-seeded for the event, which is on grass for the first time.