Rafael Nadal roared back from two sets down to edge Daniil Medvedev in a classic Australian Open final to claim a record 21st Grand Slam title only months after fearing his glorious career might be over.

With Novak Djokovic forced out by deportation and Roger Federer recovering from knee surgery, the Spanish great is now one title clear of his "Big Three" rivals after surviving the 2-6, 6-7 (5-7), 6-4, 6-4, 7-5 thriller at Rod Laver Arena.

"It was one of the most emotional matches in my tennis career," Nadal said after an epic that lasted five hours, 24 minutes.