World number three Simona Halep was dumped out of the Madrid Open on Tuesday, losing 4-6, 7-5, 7-5 in the last 16 to Belgian Elise Mertens, while Dominic Thiem claimed a straightforward win in his first match since March.
Romania's Halep, who won the Madrid title in 2016 and 2017, is still yet to reach a WTA Tour final this season and this was her earliest exit in the Spanish capital since a 2015 first-round loss.
Halep had sailed through the first two rounds on the Madrid clay without dropping a set but she ended up second best in a match which yielded 15 breaks of serve.
Halep served 10 double faults in the match, Mertens nine.
Halep, a two-time Grand Slam champion and former world number one, was twice a break up in the final set at 3-1 and 4-3 but finally succumbed after just over two and a half hours of play.
In the quarter-finals, 13th seed Mertens will meet her doubles partner, Belarusian seventh seed Aryna Sabalenka, who dispatched American Jessica Pegula 6-1, 6-2 in just 52 minutes.
World number one Ashleigh Barty will meet ninth seed Petra Kvitova in the quarters, while eighth seed Belinda Bencic is up against Spaniard Paula Badosa, ranked 62 in the world.
The final last-eight tie will see Anastasia Pavlyuchenkova play Karolina Muchova, who needed four match points to beat Maria Sakkari 6-0, 6-7 (9/11), 7-5.
Russian Pavlyuchenkova edged out Australian Open runner-up Jennifer Brady 7-5, 6-7 (8/10), 6-3 despite missing a match point in the second set.
Thiem wins on return
In the men's draw, world number four Thiem eased to a 6-1, 6-3 thrashing of American Marcos Giron in his first match for almost two months.
The Austrian, playing for the first time since a surprise loss to Lloyd Harris in Dubai, broke his 91st-ranked opponent's serve four times and did not face a break point.
"I need 100 percent in every aspect of my game," said the third seed.
"I was just not able to put that on court in Doha, Dubai, or towards the end of the Australian Open, so that's why it was better to take a break."
Thiem will next face Australia's Alex de Minaur, who was leading Harris 6-2, 3-0 when the South African retired injured, in the third round.
Italian teenager Jannik Sinner booked his place in the second round when his opponent Guido Pella withdrew with a leg injury in the second set while trailing 6-2 4-4.
"I never played against him before, so you never know what to expect," said world number 18 Sinner.
"I was trying to keep focused on what I had to do. I think it has been a good first match obviously."
Sinner, the Miami Masters runner-up, will face Alexei Popyrin in the second round after the Australian beat German Jan-Lennard Struff 6-3 7-6 (7/4).
Sixth seed Andrey Rublev, meanwhile, had to work hard before becoming the first man through to the third round, battling for two hours and 20 minutes with American Tommy Paul before coming through 6-7 (5/7), 6-3, 6-4.
"It's important to win when you're not (playing) your (best) game and things are not going well," the Russian said.
"So it's really important to win this match to have more confidence. I'm happy that I turned it around."
The in-form Rublev has reached at least the quarter-finals in all of his previous eight tournaments this season.
Former Madrid Open runner-up Kei Nishikori edged out Russia's Karen Khachanov 6-7 (6/8), 6-2, 6-2 in the first round.
But Canadian pair Felix Auger-Aliassime and Denis Shapovalov both suffered early defeats.
Auger-Aliassime, the 15th seed, lost 6-1, 6-4 to Norway's Casper Ruud in the opening round, while 11th seed Shapovalov was beaten 6-4, 5-7, 6-4 by Kazakh Alexander Bublik in the last 32.
World number 10 Matteo Berrettini saw off his fellow Italian Fabio Fognini, winning 6-3, 6-4 to book a third-round spot.
Results from the ATP/WTA Madrid Open on Tuesday (x denotes seeding):
Aryna Sabalenka (BLR x5) bt Jessica Pegula (USA) 6-1, 6-2
Elise Mertens (BEL x13) bt Simona Halep (ROM x3) 4-6, 7-5, 7-5
Anastasia Pavlyuchenkova (RUS) bt Jennifer Brady (USA x11) 7-5, 6-7 (8/10), 6-3
Karolina Muchova (CZE) bt Maria Sakkari (GRE x16) 6-0, 6-7 (9/11), 7-5
Dominic Thiem (AUT x3) bt Marcos Giron (USA) 6-1, 6-3
Alex de Minaur (AUS) bt Lloyd Harris (RSA) 6-2, 3-0 - retired
Andrey Rublev (RUS x6) bt Tommy Paul (USA) 6-7 (5/7), 6-3, 6-4
Alexander Bublik (KAZ) bt Denis Shapovalov (CAN x11) 6-4, 5-7, 6-4
Matteo Berrettini (ITA x8) bt Fabio Fognini (ITA) 6-3, 6-4
Alexei Popyrin (AUS) bt Jan-Lennard Struff (GER) 6-3, 7-6 (7/4)
Jannik Sinner (ITA x14) bt Guido Pella (ARG) 6-2, 4-4 - retired
John Millman (AUS) bt Hubert Hurkacz (POL x12) 5-7, 7-6 (9/7), 6-3
Kei Nishikori (JPN) bt Karen Khachanov (RUS) 6-7 (6/8), 6-2, 6-2
Roberto Bautista Agut (ESP x9) bt Marco Cecchinato (ITA) 6-2, 6-7 (3/7), 7-5
Casper Ruud (NOR) bt Felix Auger-Aliassime (CAN x15) 6-1, 6-4
Yoshihito Nishioka (JPN) bt Filip Krajinovic (SRB) 6-2, 6-4
Benoit Paire (FRA) bt Nikoloz Basilashvili (GEO) 6-4, 7-5
Albert Ramos-Vinolas (ESP) bt Taylor Fritz (USA) 7-5, 5-7, 6-4
Alejandro Davidovich Fokina (ESP) bt Pierre-Hugues Herbert (FRA) 6-7 (5/7), 7-6 (7/4), 7-6 (7/4)