Novak Djokovic ensured he would keep his number one ranking by extending his winning record against Gael Monfils with a 6-3, 6-2 victory in Madrid.
Djokovic, who entered the contest 17-0 head-to-head against the Frenchman, needed a win in their second round match on Tuesday to avoid surrendering the top spot to second-placed Daniil Medvedev.
Djokovic, who is a three-time Madrid champion, is finding his rhythm, after not competing much this season, but arrived to the Spanish capital fresh from a runner-up showing at his home tournament in Belgrade.
The Serb saved three break points in his first two service games before he wrested control of the match from Monfils and grabbed a one-set lead in 47 minutes.
Djokovic had to save two break points as he served for the match before he booked a last-16 showdown with Andy Murray or Canadian 14th seed Denis Shapovalov.
Sixth seed Andrey Rublev survived a difficult day on Estadio Manolo Santana, needing to rally from 0-3 down in the decider to overcome British wildcard Jack Draper 2-6, 6-4, 7-5.
The Russian world number eight, who beat Djokovic in the Belgrade final last week, dropped serve twice in the opening set and lost an early advantage in the second before squeezing past the left-handed Draper, who is ranked 121 in the world and was making his ATP clay-court debut in Madrid.
The two-hour, 19-minute battle contained a combined 63 winners, 34 off Rublev's racquet.
Rublev is the joint leader – alongside Rafael Nadal and Carlos Alcaraz – on the ATP tour this season with three titles.
Another seed pushed to his limits was Poland's Hubert Hurkacz. The 12th seed fought for nearly three hours before completing a 7-5, 6-7 (11/13), 6-3 victory over Bolivian qualifier Hugo Dellien.
Hurkacz's reward is a second-round date with in-form Spaniard Alejandro Davidovich Fokina.
Meanwhile, former US Open champion Bianca Andreescu's Madrid campaign came to an end at the hands of American 12th seed Jessica Pegula, 7-5, 6-1.
Andreescu served for the opening set but was broken. She then had a nosebleed during the changeover at 6-5. The Canadian saved four set points on her serve in game 12 but faltered on the fifth as Pegula snatched the lead.
Despite a rain interruption in the second set, Pegula wrapped up the win in under two hours and set up a quarter-final against home favourite Sara Sorribes Tormo.
Sorribes Tormo became just the fourth Spanish woman to reach the last eight at the Madrid Open, navigating a tricky draw that saw her dispatch Anastasia Pavlyuchenkova and Naomi Osaka before her 6-4, 1-6, 6-3 win over Daria Kasatkina on Tuesday.