Novak Djokovic beat Rafael Nadal for the seventh time in a row to defend his Australian Open title with a thrilling five-set victory in Melbourne.

The world No. 1 recovered from losing the opening set to claim his fifth grand slam with a 5-7 6-4 6-2 6-7(5) 7-5 victory in the longest match in Australian Open history.

Djokovic came within two points of victory in the fourth set, but he came from a break down in the fifth to finally emerge triumphant after a brutal match lasting five hours and 53 minutes on Rod Laver Arena.

Nadal, who beat Federer in four sets on Thursday, had the luxury of two days' rest, while Djokovic, needed nearly five hours to see off Andy Murray on Friday. While Djokovic may have had the mental edge, having won the last six meetings between the pair, Nadal attempted to neutralise that threat by pushing Djokovic physically from the outset.

And the Serb looked to be battling fatigue in the early stages as Nadal produced a superb backhand cross-court winner to forge the first break point of the match. Two big serves got Djokovic out of trouble, but a netted backhand gave Nadal a second chance, before a languid backhand gifted the Spaniard an early break.

Djokovic fought hard to break back immediately, a backhand volley brought him to deuce on Nadal's serve, but the second seed wrapped up the game to take a 4-2 lead. But Djokovic was unbeaten in his last 20 grand slam matches, and he dug deep, securing a crucial service hold before breaking back at the third time of asking.

Nadal had the chance for a triple break point, but an unlucky net cord allowed Djokovic back into the game and he took a 5-4 lead to force Nadal to serve for the set. After racing to a 40-0 lead, Nadal was pegged back to 40-30, but unleashed a blistering forehand to level the scores.

The Spaniard grabbed break point with a forehand down the line before a 19th unforced error from Djokovic handed Nadal the chance to serve for the set, and although Djokovic saved two set points, Nadal wrapped up a brutal opening set after 79 minutes.

Nadal had lost just one grand slam match after winning the opening set, but he could not afford to rest on his laurels against the world No. 1, and the Serb looked livelier in the second set as he loosened up and reduced his error count.

And the Serb was rewarded for his crisper hitting with a break to take a 3-1 lead, digging out a volley to snatch the break. Pouncing on Nadal's second serves, Djokovic began to dominate the baseline rallies, and the Spaniard struggled to find a way back.

Serving for the set, Djokovic twice forced Nadal out wide on his backhand before burying a volley to carve two set points, but an overenthusiastic backhand snuck wide before Nadal saved the second with a blistering forehand.

Nadal atoned for a poor drop shot with a forehand cross-court volley for break point, and a double fault from Djokovic handed Nadal the break. But the world No. 1 recovered from squandering two set points to break back to snatch the set, a double fault from Nadal returning the favour.

With Djokovic firmly in the ascendancy, Nadal was camped out behind the baseline, and although the Spaniard hung onto his serve to level at 1-1 in the third set, Djokovic's pressure took its toll and as in the second set he broke to lead 3-1 when Nadal hooked a forehand wide after a gruelling 20-stroke rally.

He consolidated the break in emphatic fashion, serving out to love for a 4-1 lead, and although Nadal hung on to his service game keep himself in the set, it merely delayed the inevitable as Djokovic creamed a backhand to wrap up the third set and tighten his grip on the match.

Nadal's fans were in a frenzy when the Spaniard took a 30-15 lead on Djokovic's serve, but with the top seed serving first in the fourth set, he always had the upper hand. Leading 4-3, the Serb opened up his forehand to fashion three break points, and the Serb was just five points away from the championship.

However, Nadal is a fierce competitor, and he saved the first break point with a penetrating forehand. A big serve rescued the second before he sent a backhand down the line which spun away from Djokovic. The Spaniard got his nose in front with an ace, before another huge serve down the middle resulted in a huge service hold.

As the clock ticked over to four hours, any sign of a swing in momentum was checked as the rain set in and the players were forced off court while the roof was closed. Djokovic, who had been one point away from serving for the match, was left to rue what might have been during the break in play.

But any doubt was immediately cast aside as Djokovic proved impenetrable on his serve, holding to love to put the pressure immediately back on Nadal, who dug out a backhand to force a fourth set tiebreak.

Nadal saw his chance to steal an early lead dissolve when he hit a backhand long after Djokovic left the court open, and when the ball bounced off the top of the net, it looked like it might be Djokovic's day. An inch-perfect forehand which wrongfooted his opponent put the Serb within two points of victory, but he let Nadal back in, spraying his forehand wide after a brutal rally.

When Nadal's backhand bounced short, Djokovic had the title in sight, but he failed to put away the winner, instead finding the net, and at 5-5 the pair were back on level terms. It was gone midnight local time, but the crowd were desperate to see a fifth set, and Rod Laver Arena was buzzing when Nadal produced an ace for set point, and when Djokovic hit a forehand wide, the Spaniard sank to his knees as if he had won the championship.

Playing with renewed confidence and energy, Nadal took the match to Djokovic, who looked like he was running on empty, and a pair of unforced errors handed Nadal a break to go 4-2 up.

But an inexplicable error from the Spaniard, snatching at a backhand with the court at his mercy, opened the door for Djokovic, and the Serb didn't need a second invitation as he broke back after a wayward forehand from Nadal.

Djokovic sank to the floor in disbelief when a backhand sailed long, and he could scarcely believe his misfortune when his drop shot failed to clear the net. The Spaniard held on to force Djokovic to serve to stay in the match, but the Serb held his nerve before snatching a break to coolly serve out for the championship to become only the fifth man in the Open era to win three consecutive grand slam titles.