Ash Barty's hopes of winning the Madrid Open have received a huge boost after World No.3 Simona Halep crashed out on Tuesday.
Halep collapsed after taking the first set and breaking Mertens in the second and third, the Belgian producing an extraordinary comeback to win 4-6 7-5 7-5.
'REALLY BAD': Tennis fans stunned by Naomi Osaka shocker
Mertens, the 13th seed, upset the two-time Madrid champion in two hours and 34 minutes to claim a first win on clay over the Romanian in four meetings.
Halep won the title at the Caja Magica in 2016 and 2017 and was a finalist again the last time the tournament was held in 2019.
But she couldn't get the job done despite having multiple chances to send Mertens packing.
"She played really well, and she definitely deserved to win because she was stronger in the end," Halep said.
"I cannot say I played bad, but I did some mistakes, important mistakes.
"Sometimes it's just a little bit and the match is going away."
Mertens will now meet doubles partner Aryna Sabalenka in the quarter-finals after the Belarusian crushed Jessica Pegula 6-1 6-2.
Meanwhile, Russia's Anastasia Pavlyuchenko will face Karolina Muchova in the last eight after beating 11th-seeded American Jennifer Brady 7-5 6-7 (8-10) 6-3.
Unseeded Czech Muchova, who accounted for World No.2 Naomi Osaka in the second round, earned her place in the quarters with a hard-fought 6-0 6-7 (7-9) 7-5 win over Greek 16th seed Maria Sakkari.
Ash Barty's title odds shorten after upsets
Barty is now the red-hot favourite to win the WTA 1000 event following shock losses for Halep and Osaka.
The World No.1 underlined her French Open title favouritism with an imperious display to storm into the quarter-finals on Monday.
Barty beat Polish teenager Iga Swiatek 7-5 6-4 in a much-anticipated showdown between the past two Roland Garros champions.
The Aussie star rallied from 3-0 down in the opening set, and was never broken after that in cruising to victory.
In doing so, Barty improved her 2021 record against top-20 players to 9-0.
"I really enjoyed myself out there tonight. I enjoyed the challenge," Barty said after booking a quarter-final date with ninth seed Petra Kvitova.
"Iga's game is exceptional. It's really, really impressive.
"I love testing myself and trying to figure out the puzzle tonight and the challenges that she created for me."
Watch 'Mind Games', the new series from Yahoo Sport Australia exploring the often brutal mental toil elite athletes go through in pursuit of greatness:
Click here to sign up to our newsletter for all the latest and breaking stories from Australia and around the world.