Kevin Durant scored 30 points, LeBron James had 19 and Kobe Bryant 17 to lead the Americans.
The game was a rematch of the 2008 Olympic gold-medal game in Beijing.
The United States was undefeated throughout the Olympic tournament. Spain lost two games in the preliminary round.
Pau Gasol led Spain with 24 points.