Spain won the Davis Cup for the second time in their history when Carlos Moya beat the USA's Andy Roddick in the fourth rubber in Seville.
Moya won 6-2 7-6 (7-1) 7-6 (7-5) to give the hosts an unassailable 3-1 lead with only one singles rubber remaining.
Roddick battled hard and had chances in the second set, but Moya's clay-court expertise proved the difference.
Mardy Fish beat Tommy Robredo 7-6 (8-6) 6-2 in the final dead rubber to cut Spain's winning margin to 3-2.
Spain's only other Davis Cup title came in 2000, when they beat Australia in Barcelona.
This time they chose to play the final in Seville and the city's Olympic Stadium was revamped to allow for a record crowd for a competitve tennis event of 27,000 spectators.
And the home fans gave vociferous support to their players, with 18-year-old Nadal and Moya winning both Friday's singles rubbers.
American twins Mike and Bob Bryan gave the visitors hope with victory over Juan Carlos Ferrero and Tommy Robredo in Saturday's doubles.
But it remained an uphill task for a US team far happier on hard courts than clay, and 1998 French Open champion Moya had too much for world number two Roddick.
"This has been incredible - the moment I've been waiting for for years," said Moya, who missed out in 2000 through injury.
"I've prepared myself for this day. I knew that playing on clay I would have my
chances to win.
"The Davis Cup is my dream. I can't ask for more. There is nothing bigger than what I've lived today."
Moya stormed into a 4-0 lead on his way to taking the first set against Roddick and recovered immediately from dropping serve in the second.
The match came down to two tie-breaks and Moya dominated both, clinching victory on his third match point.
Wild celebrations followed, with an emotional Moya congratulated by his team-mates, including Nadal, who at 18 years and 187 days becomes the youngest ever victor in Davis Cup history.
"I think we put up a better fight here than in Paris two years ago," said Roddick, who was on the US team which lost to France in the 2002 semi-finals at Roland Garros.
"They were just better than us this weekend. I have nothing to be ashamed of, I gave it my all.
"I am not going to walk out of here with my head down, that's for sure.
"There's no miracle answer. We have to improve."