The Russian will face either Dusan Lajovic of Serbia or American Frances Tiafoe for a place in the quarterfinals of the prestigious ATP Masters and WTA hardcourt tournament.
Top-seeded Daniil Medvedev hobbled into the fourth round of the Miami Open, defying crippling leg cramps to beat Australian Alexei Popyrin 7-6 (7/3), 6-7 (7/9), 6-4.
World No. 2 Medvedev, increasingly hampered on Sunday, as the third set wore on in the heat and humidity of South Florida, nevertheless mustered the only service break of the third set on the way to a dramatic victory over 86th-ranked Popyrin.
"It's probably one of the sweetest victories in my career, because I was cramping like hell in the third set," Medvedev said on court as he limped in circles seeking relief.
"It's difficult to think about victory when you're cramping. At the same time, I should have won in two sets and we would not be talking about cramping."
Medvedev had certainly appeared to be cruising to the finish line when he seized a 5-2 lead in the second set.
Popyrin held serve for 5-3, but since Medvedev hadn't faced a break point in the match another hold seemed a mere formality.
Instead, Medvedev was shockingly broken at love in a game that featured a double fault and three superb forehand winners from Popyrin, including a stinging cross-court return on break point.
Medvedev appeared to have righted the ship, however, as Popyrin promptly fell 0-40 down in the next game.
But an ace, a service winner and a forehand long from Medvedev erased three match points, Popyrin holding to push the set toward the tiebreaker.
Medvedev briefly got his nose in front in the decider with a point for 5-4, and he saved two set points before Popyrin, who won his first ATP title at Singapore in February, leveled the match with another forehand winner on his third set point.
By then, Medvedev was feeling the strain, requesting additional electrolyte drinks and seeking what relief trainers could provide with massage on the changeovers, with no medical time out allowed for cramping.
"Of course, it would have been better to just win it 6-3 in the second or 6-4 when I had a triple match point," Medvedev said.
The Russian, runner-up to Novak Djokovic at the Australian Open in February, will face either 16th-seeded Dusan Lajovic of Serbia or American Frances Tiafoe for a place in the quarter-finals of the prestigious ATP Masters and WTA hardcourt tournament.
In other men's action, John Isner, the 2018 champion and 2019 runner-up, booked a fourth-round spot with a 7-6 (7/5), 7-6 (7/5) victory over 11th-seeded Canadian Felix Auger-Aliassime.
The match was a near-carbon copy of Isner's two-tiebreak win over Auger-Aliassime in the 2019 semi-finals. The 35-year-old US veteran next faces another familiar foe in Roberto Bautista Agut.
The seventh-seeded Spaniard beat Germany's Jan-Lennard Struff 4-6, 6-3, 6-2 to book a chance to avenge his 2019 quarter-final Miami loss to Isner.
Osaka advances by walkover
Italian teenager Jannik Sinner out-lasted 14th-seeded Karen Khachanov 4-6, 7-6 (7/2), 6-4, in a physically taxing battle that lasted two hours and 50 minutes.
"I'm very happy that I won today this tough match," said Sinner, who booked a last-16 meeting with Finland's Emil Ruusuvuori.
Ruusuvuori, who toppled third-seeded Alexander Zverev in the second round, beat Sweden's Mikael Ymer 4-6, 6-1, 7-5.
In the women's draw, second-seeded Naomi Osaka reached the fourth round without lifting a racquet, advancing by walkover when scheduled opponent Nina Stojanovic withdrew with a right thigh injury.
Second-ranked Osaka, the reigning US and Australian Open champion, is in the last 16 of the prestigious ATP Masters and WTA event at the Hard Rock Stadium for the first time in five appearances.
The Japanese star, who could overtake top-seed Ashleigh Barty with a victory if the Australian star fails to reach the final, next faces 16th-seeded Belgian Elise Mertens, who defeated Anett Kontaveit of Estonia 6-2, 0-6, 6-2.
American Jessica Pegula ousted sixth-seeded Czech Karolina Pliskova 6-1, 4-6, 6-4 to set up a meeting with Greece's Maria Sakkari, a 6-0, 6-1 winner over Russian Liudmila Samsonova.
Spain's Garbine Muguruza, a two-time Grand Slam winner who ended a two-year title drought in Dubai this month, rallied for a 4-6, 6-3, 6-4 victory over Anna Kalinskaya.