With Spain’s King Felipe watching on, the 33-year-old Nadal fought off Canadian youngster Denis Shapovalov 6-3 7-6(7) to give Spain their first title since 2011.
Spain's talisman Rafael Nadal sealed a sixth Davis Cup title for his country on Sunday when they beat Canada 2-0 in the final of the revamped event.
After a week of relentless tension and late-night heroics it was perhaps asking too much for the first final in the Davis Cup's new guise to deliver a classic and so it proved as Spain became the last nation standing of the 18 who assembled in Madrid.
With Spain's King Felipe watching on, the 33-year-old Nadal fought off Canadian youngster Denis Shapovalov 6-3 7-6(7) to give Spain their first title since 2011.
If any player deserved to get his hands on the famous old trophy again it was Nadal after he worked overtime all week, often into the small hours, to win all eight matches he played.
But he surely would have been happy had it been team mate Roberto Bautista Agut to have delivered the winning point.
Bautista Agut had given the hosts a flying start, beating Felix Auger-Aliassime 7-6(3) 6-2 after returning to the squad following the death of his father.
"An amazing week in every way," said Nadal, who has now won 29 successive Davis Cup singles matches since 2004. "The vital person has been Roberto Bautista."
After beating Auger-Aliassime, Bautista Agut was embraced by his captain Sergi Bruguera and there were emotional scenes at the end as roars of "Campiones" echoed around the arena.
"It was a dream day and all the team members have made an incredible effort, especially Rafa, going to sleep at three, four and five in the morning and the next day going out to play," Bautista Agut said. "It can only be because we are Spanish."
For Gerard Pique, the Barcelona football player who has made revamping the Davis Cup into a tennis World Cup his mission, it was the perfect climax to a week in which the new format suffered glitches but could be judged a qualified success.
Too many late nights, one session finishing at 4.07 a.m., a complicated group stage and tiny crowds at some ties mean there is still lots to improve if the $80 million Pique's Kosmos company is investing in the event each year is sustainable.
But Sunday felt like an authentic Davis Cup final, even if an appearance from Pique's pop singer wife Shakira added a little more glamour than usual.
Once the tennis began it quickly became apparent that Canada captain Frank Dancevic's decision to change his lineup for the first time all week might have backfired.
Vasek Pospisil, ranked 150, had been outstanding all week, beating Italy's 12th-ranked Fabio Fognini and American Reilly Opelka in the group phase, taking down Australia's John Millman in the quarter-finals and partnering Shapovalov to a deciding doubles victory over Russia in the semi-final.
Auger-Aliassime, who has been out with an ankle injury, was given his first call of the week but was outplayed by a rock-solid Bautista Agut, who rejoined the squad on Saturday.
That left Shapovalov seemingly facing mission impossible and his only chance was Nadal's tank being dry.
Having come this far there was no chance Nadal would falter — not with 25,000 Spaniards roaring at every whipped winner.
When he took the opening set with a single break it was all feeling a little anti-climactic for the neutrals but Shapovalov injected some late drama into the proceedings.
The Canadian's serve began to click and his groundstrokes finally took the zip out of Nadal's legs.
Incredibly Nadal showed mercy at 6-4 in the tiebreak, failing to put away a short forehand, and Shapovalov arrowed a winner down the line. The Canadian, cheered on by hundreds of his countrymen, saved another match point then had a set point of his own but Nadal averted the danger with a heavy serve.
Nadal got to a third match point and this time Shapovalov could not fight back.