The US NBA stars will play for the title on Sunday against the winner of a later semi-final between Australia and Serbia.
“It means a lot to be in the final game, to win the gold. we like our chances,” said US guard Kevin Durant.
“We need to continue to play with that effort on the defensive end. With passion like that it's going to be tough to beat us.”
Durant added 14 points for the US team while Kyrie Irving contributed 13 and DeAndre Jordan scored nine points, grabbed 16 rebounds and blocked four shots as well as disrupting numerous Spanish shots.
He played a great game,” US coach Mike Krzyzewski said.
“We wouldn't be playing for the gold medal if DeAndre didn't play that well.”
The Americans captured their 24th consecutive Olympic victory and stretched their 10-year overall win streak to 75 games since a 2006 World Championships semi-final loss to Greece.
But a Spanish side boasting seven NBA standouts and three former NBA players kept the US elite to their lowest-scoring Olympic game since 2004 and their thinnest margin in a knockout game over their unbeaten decade.
“We held them to 82 points. That was pretty good. I'm not sure many teams can do that,” said Spanish center Pau Gasol, who scored a game-high 23 points and grabbed eight rebounds.
“We made it hard on them, but they made us pay a lot with their physical power on the offensive glass. If we would have cut down those (offensive rebounds), we would be probably talking about a different result right now.
But we didn't. They took advantage of their strength.”
Gasol, a two-time NBA champion, said Spain missed its best chance to upset the USA.
“I don't think they are playing as well as other times they have played,” Gasol said. “But they're still a very talented team individually.
“If we would have been a little sharper with our shots, moved the ball a little better, boxed out a little more — it's a two or three-possession game. In the end we could be talking about a whole different story.”