-- MELBOURNE, Australia -- In what might have been the most important tennis match in history, Roger Federer made an emphatic case for the title of greatest male player ever.
On Federer's second match point, he finished it with a forehand winner on the line that was challenged by Nadal and -- after an awkward but thrilling pause -- upheld by replay.
After missing six months of tennis from July to January, the 35-year-old Federer, who hadn't won a Grand Slam singles title since Wimbledon in 2012, improbably ran his major total to 18, four ahead of Nadal. Suddenly, the odds of Nadal catching Federer have diminished greatly.
"Against Rafa it's always epic," Federer said in a television interview. "This one means a lot to me because he's caused me problems over the years."
The oldest major finalist in 43 years, Federer lost control of his legendary forehand in the final two sets but rallied famously late in the fifth. He was flying around the court in the final games.
Federer accepted the silver trophy, appropriately, from the great Aussie champion Rod Laver, whose name is on the stadium.
"I'm out of words," Federer said in his on-court interview, addressing Nadal. "I don't think either one of us believed we'd be in the final here when we were at your academy five, six months ago. Here we stand in the finals.
"I'm happy for you. I would have been happy to lose to you. The comeback was perfect as it was. It's been a difficult last six months, let's be honest. I wasn't sure I was going to be here, but here I am. This was a wonderful run, and I can't be more happy to win tonight."
Federer noted that while there are no draws in tennis, he would happily share this titanic title with Nadal.
It was Nadal, 30, perhaps the most resilient and mentally tough tennis player of his or any generation, who blinked in the end.
When it was over, Nadal looked stricken.
"First of all, I can say congrats to Roger and all his team," Nadal said in his on-court interview. "Just amazing the way he's playing after such a long time without being on the tour. For sure, you have been working hard to get that one, so very happy for you.
"Today, I think was a great match. Probably Roger deserved it a little bit more than me."
Federer becomes the fourth-oldest Grand Slam winner ever; Ken Rosewall won majors at the ages of 35, 36 and 37. Federer is also the first man in tennis history to win three majors five or more times. His trophy collection includes five Australian Opens, one French Open, seven Wimbledons and five US Opens.
And so, the match -- the Thunder Down Under -- actually lived up to its over-the-top billing, particularly in the final crucial stages.
This was a dramatic collision of the two most decorated players of their generation. The fact that they were well past their prime -- and hadn't met in a Grand Slam final in almost six years -- made it even more delicious.
This first Grand Slam final of the year sent the tennis universe into a frenzy, and record television ratings were expected. At Melbourne Park, some courtside seats were reportedly going for $26,000. For the first time, organizers opened the second-biggest show court, Margaret Court Arena, and showed the match on the video screens. Nearly 25,000 attended the session.
As recently as three months ago, this matchup didn't seem remotely possible. When the two men got together at the opening of Nadal's new tennis academy in Mallorca, Spain, Federer was still troubled by a balky knee and Nadal a wrist injury. Instead of playing an exhibition, they hit a few balls with the juniors and posed for photos.
Nadal had said neither player could have imagined making the final of the year's first Grand Slam after coming back from their respective injuries.
Even when they arrived in Australia, they were afterthoughts, with Nadal seeded No. 9 and Federer No. 17. But when No. 1 Andy Murray and No. 2 Novak Djokovic crashed out early, they began to attract attention.
There were, however, some mitigating circumstances that allowed Federer fans to dream.
Federer, who beat Wawrinka in a five-set semifinal Thursday, had an extra 24 hours to recover for this final. Nadal needed a bruising 4 hours, 56 minutes to defeat Grigor Dimitrov one night later.
At one time, Nadal seemed physically indestructible. In 2009, he defeated Fernando Verdasco in an Aussie Open semifinal match that ran 5 hours, 14 minutes then recovered quickly to beat Federer in a five-set final. But that was eight years ago.
And then there were the speedy conditions -- according to the players, faster courts and balls -- that helped Federer's fluid game. Serving and coming to the net would prove critical for Federer, no more so than in the first set.
Federer won 14 of the 15 points when he landed his first serve in during the opening set. He finished the set with an ace, which was encouraging. Federer hadn't beaten Nadal in any match in which he lost the first set in more than a decade.
Predictably, Nadal came racing back, winning the first four games of the following frame. Federer's forehand became unstrung, and Nadal, also attacking the backhand with high-hoppers, leveled the match.
Federer raced out to a 40-love lead in the first game of the third set then weathered three break points to hold. Federer broke Nadal immediately and won six of seven games.
Nadal, who wasn't moving with his usual abandon, broke Federer in the fourth set's fourth game. A marginal favorite in this battle for the ages, Nadal rolled in the fourth set, never facing a break point, to send the match to a fifth and final set.
The match, played at a relatively brisk pace, cooled considerably when Federer left the court for treatment. After a seven-minute break, it felt like a new match.
The fifth set, unlike the three that preceded it, was spectacular.
After whiffing on five break points in the set, Federer converted in the sixth game and, 3 hours and 19 minutes in, the match was level.
After going 1-for-10 on break points, Federer converted with Nadal serving at 3-4. He held that margin to the end, winning on that dramatic replay call.
It was the fourth time a Federer-Nadal Grand Slam final went to five sets, the most between any two players in the Open era, according to ESPN Stats & Information. Federer became the first No. 17 seed to win a Grand Slam title since Pete Sampras won the 2002 US Open in his final major appearance.
Nadal said he was pleased with his play in Australia, saying he's "back at a very high level."
"I'm going to keep fighting during the whole season and for sure, to come back here for many years and keep trying to have this trophy," Nadal said. "That is the third time that I have [the runner-up trophy]. This is beautiful but still much better the trophy."
The Associated Press contributed to this report.