Daniil Medvedev overcame leg cramps to reach the fourth round of the Miami Open on Sunday, beating Australian Alexei Popyrin 7-6 (7/3), 6-7 (7/9), 6-4.

It was tough for the No. 1 seed, especially in the third set, where he looked flustered before summoning enough energy to grab the only service break of the set for the win.

“It’s probably one of the sweetest victories in my career, because I was cramping like hell in the third set,” Medvedev said afterwards.

“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.”

Earlier, Medvedev looked to be causing towards a straight sets win at 5-2, before the young Aussie staged a remarkable fightback.

Popyrin held serve for 5-3, then fought off a Medvedev fightback to take it to a tiebreak, which he won.

“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 will face either 16th-seeded Dusan Lajovic of Serbia or American Frances Tiafoe for a place in the quarter-finals.