Rafael Nadal beat world number one Novak Djokovic in a pulsating four-set final to claim his second US Open title in New York.

The Spaniard, 27, held on magnificently in the third set to go on and win a gripping contest 6-2 3-6 6-4 6-1 in three hours and 21 minutes.

Most Grand Slam singles titles

17 - Roger Federer

14 - Pete Sampras

13 - Rafael Nadal

12 - Roy Emerson

11 - Rod Laver, Bjorn Borg

One incredible 54-shot rally - the longest in the tournament by 20 shots - summed up a battle that thrilled the 23,000 spectators in Arthur Ashe Stadium.

Nadal has now won 13 Grand Slam singles titles and moves within one of Pete Sampras in the all-time list, with Roger Federer leading on 17.

And after missing last year's US Open during a seven-month absence with a knee injury, Nadal is now set to regain the number one ranking.

"Having this success is amazing," he said. "I never expected it. That's life and I'm lucky to have what I'm having.

Can Nadal surpass Federer?

"If he stays healthy, he can easily win four or five more Slams. No question about it. To me, he's better than ever.

It's amazing how badly he wants it. I've never seen anything like it. Let's hope he stays healthy because it wil be great for our sport."

"I really love the competition, I really love the sport. All my career I dreamed to be involved in matches like today. I enjoy every moment.

"These things are not forever. In a few years I won't have this chance. I try my best, I have passion and that's all I can do."

Monday's final was a predictably electrifying, punishing contest as the pair met for the 37th time - taking them past the rivalry of John McEnroe and Ivan Lendl to set a new record since the Open era began in 1968.

It was their sixth Grand Slam final and third at Flushing Meadows, after the Spaniard won in 2010 and Djokovic took revenge in 2011.

Nadal, seeded second, had a 21-0 record on hard courts this year heading into the final, and had dropped serve just once while powering through the draw in New York.

Match stats

Djokovic

Nadal

Match time: 3hrs 21mins

6

Aces

1

2

Double faults

1

68

1st serve %

64

58

1st serve win %

65

48

2nd serve win %

56

46

Winners

27

53

Errors

20

3/11

Break points

4/12

He began as many people's favourite and set about proving them right as he dominated for the first hour, accelerating through his forehand to find a gear that Djokovic simply could not contain.

Two breaks earned Nadal the first set in a relatively brisk 42 minutes, but for the next 80 minutes it was all Djokovic as his forehand now began to dictate, while his returning ability increased the pressure.

Nadal's seemingly impregnable serve was broken three times in succession, the first thanks to that lung-busting 54-shot rally that explored every inch of the court, and Djokovic raced through six of seven games to take a 2-0 lead in the third.

Nadal was reeling, fending off another break point to avoid falling a double break behind, and it proved significant when the Djokovic storm abated and the errors crept back in game six.

After two hours and 17 minutes, the world's top two players were level at 3-3 in the third set, and it looked as though Djokovic had made the decisive move when he earned three break points at 4-4.

Media playback is not supported on this device

Rafael Nadal says his second US Open title is his &quot;most emotional win&quot;

Nadal was knocked off his feet by the force of one strike that clipped his baseline, but the irrepressible Majorcan refused to yield, coming back to hold and then launching into a return game at 5-4 to earn set point.

A trademark hammer of a forehand was too much for even the elastic Djokovic to get back, and a jubilant Nadal crouched at the baseline, punching his fist, as he took a lead that had seemed hugely unlikely only minutes earlier.

The belief appeared to drain from Djokovic and, after saving an early break point in the fourth set with a net cord, Nadal left no room for bad luck when he crunched another forehand on his next opportunity.

A titanic struggle came to a tame end as Djokovic sprayed two backhands into the tramlines to fall 5-1 behind, but there were plenty of emotions on display after Nadal saw the Serb find the net on match point.

In-form Nadal

Nadal has now won all 22 hard-court matches he has played in 2013

He has won 10 titles this year, from 12 finals

He has lost only three of 63 matches all year

He had won 88 consecutive service games until Richard Gasquet broke him in semi-final

The victorious Spaniard fell to the ground before tearfully celebrating with his supporters.

"All of my team knows how much this match today means to me," added Nadal. "Playing against Novak is always a very special feeling and nobody brings my game to the limit like he does."

Djokovic, whose loss was a fourth in five US Open finals, admitted. "He was too good, he definitely deserved to win this match and the trophy.

"Obviously, it's disappointing to lose a match like this. Again, it was a huge privilege and an honour to fight for this trophy."