Nadal held off a stirring comeback by Federer from two sets down to prevail 6-4, 6-4, 6-7 (5), 6-7 (8), 9-7. He became the first man to win the French Open and Wimbledon in the same year since Bjorn Borg in 1980.
Nadal, the first Spaniard to win Wimbledon since Manolo Santana in 1966, avenged his losses to Federer in the last two finals here and snapped the Swiss star's All England Club winning streak at 40 matches and overall grass-court run at 65.
The rain-delayed match ended in near darkness after 4 hours, 48 minutes of play – the longest men's final in Wimbledon history – when Federer slapped a forehand into the net on Nadal's fourth match point and second of the game.
Nadal fell onto his back in exhilaration at the baseline. With his shirt caked with turf, he congratulated Federer and climbed into the players' box to embrace his entourage. He had tears in his eyes as he grabbed a Spanish flag and walked across the television commentators' booth to the edge of the Royal Box to shake hands with Prince Felipe and Princess Letizia of Spain.
"It's impossible to explain what I felt in that moment," Nadal said after receiving the winner's trophy from the Duke of Kent. "Just very, very happy to win this title. For me, (it) is a dream to play in this tournament. But to win, I never imagined something like this."
Federer, who converted only one of 13 break points in the match, fell short in his bid to set two landmarks: He failed to surpass Bjorn Borg by winning a sixth consecutive title or equal Willie Renshaw's record of six in a row from 1881-86.
"I tried everything," Federer said. "Rafa is a deserving champion. He just played fantastic. It was the worst opponent on the best court."
Nadal won his fifth Grand Slam title, adding to his four consecutive French Open championships. Federer, meanwhile, remains two shy of Pete Sampras' record of 14 Grand Slam wins.
"He's still No. 1," Nadal said. "He's still the best. He's still five-time champion here and I only have one, so for me it is very, very important."
Watching it all from the front row of the Royal Box was the silver-haired Borg, who won 41 straight Wimbledon matches during his 1976-80 title runs.
As Nadal and Federer battled through the fifth set in fading light, they were like two heavyweights going toe-to-toe in the late rounds of a title fight. The intensity and quality of the match recalled the 1980 final between Borg and John McEnroe, which the Swede won in the fifth set after losing an 18-16 tiebreaker.
McEnroe, a three-time Wimbledon champion and a television commentator at this tournament, called Sunday's final the "greatest match I've ever seen."
Nadal, who has won 24 straight matches, extended his career record against Federer to 11-6, but it was only his third win in six against him on a surface other than clay. Nadal had lost in the last two Wimbledon finals to Federer.
Sunday's epic victory was Nadal's second straight over Federer in a Grand Slam final – and this time on the champion's favorite court and surface. Nadal crushed Federer in last month's French Open final, losing only four games.
Federer, playing in his 16th Grand Slam final, had reached this title match without dropping a set but ran into a player who muscled him around the court for the first two sets with his punishing topspin forehand and refused to buckle in the face of an amazing comeback.
Federer, who saved two match points in the fourth set tiebreaker, came oh-so-close to becoming the first player to overcome a two-set deficit in a Wimbledon men's final since 1927, when Henri Cochet beat Jean Borotra.
Federer also nearly became the first man in 60 years to win the title after saving a match point in the final – Bob Falkenburg beat John Bromwich in 1948 after saving three match points at 3-5 in the fifth set.