By Mark Elkington
But the young replacements showed their mettle in a hostile Madrid against a more experienced side, who narrowly lost out on gold in China.
Guard Kevin Durant led the way with game-high 25 points and eight rebounds, closely supported by Derrick Rose and Lamar Odom who sank 13 and 12 points apiece.
Juan Carlos Navarro topped the scoring for the hosts with 20 points backed by Marc Gasol and Felipe Reyes who notched 17 and 16 each.
"It was a great game and a great crowd. Two excellent teams who played to their max," U.S. coach Mike Krzyzewsky told reporters.
"Fortunately we had one more play than them. I feel lucky to have won. We started with a different line up and that was really what we wanted tonight, to take a better look at our players."
The MVP from the last world championships was sitting just behind the world's most expensive soccer player, Portugal and Real Madrid forward Cristiano Ronaldo in the packed arena.
The U.S. labored past Lithuania 77-61 on Saturday, a side Spain swept aside 94-75 the day before, but they were much quicker into their game, aggressively closing down their hosts and preventing them from scoring until almost the five minute mark.
Navarro took Spain to within two points at 55-53 midway through the third as the locals threatened a comeback, but Durant sank a breakaway at the end of the third to restore an 11-point advantage going into the final period.
Once again Spain came back though with Ricky Rubio and Navarro at the helm, the latter drawing them level at 80 apiece with two minutes to go.
But Rose held his nerve amidst a raucous local crowd to take the game from the free-throw line in the final seconds.
"This has been a great experience for us against one of the best teams in the world," game MVP Durrant told reporters.
"I'm pleased with my contribution... and the way the team stuck together."
The U.S. have one more tune-up game against Greece in Athens on Wednesday before the world championships get underway in Turkey on August 28.
(Writing by Mark Elkington; Editing by Dave Thompson)