Syracuse coach Jim Boeheim called for a switch to his trademark "Orange" 2-3 zone with the United States clinging to a one-point lead.
Kevin Durant did the rest, blocking shots by Ricky Rubio and Rudy Fernandez in the final seconds in the Americans' 86-85 victory over Spain on Sunday in a warmup game for the world championships.
"Jim Boeheim said, 'Let's go orange,'" U.S. head coach Mike Krzyzewski said. "So we did. It was his suggestion and our guys did a good job with that."
Durant led the United States with 25 points.
The decision to go to the zone defense for the last play caught Spain off-guard after Derrick Rose put the Americans ahead with two free throws.
"I just wanted to cover as much ground as I could and help my teammates," said Durant, who also had 10 rebounds. "I just didn't want to foul on a 3-pointer so I stayed down and, luckily, game over."
The United States rallied after Spain — 13 points behind after three quarters — took a one-point lead on Juan Carlos Navarro's three-point play with 27 seconds left.
"It was one of those games that was a learning experience for us and I think we made key plays down the stretch," Durant said. "We also played as a team and stuck through tough times."
Navarro scored 20 points in the first game between the teams since the Americans won the 2008 Olympic final. It was the first loss in nine games for Spain, the defending world champion. The world championships begin Saturday in Turkey.
Spain took the lead for the first time with 90 seconds to play. Rubio's stutter step into the lane drew attention and allowed the teen point guard to feed Felipe Reyes for an easy layup and an 82-80 lead.
But Durant answered before Rose got past Rubio and avoided Marc Gasol's block to score with a one-handed shot that put the U.S. up 84-82 with 33 seconds to play.
"We made one more play than they did and that's why we won," Krzyzewski said.
Rose finished with 13 points, and Lamar Odom had 12 points and nine rebounds for the United States, 3-0 on its exhibition tour.
"I thought 'I've got to hit them,'" Rose said about his winning free throws. "Over here, people are going to remember me for this."
The U.S. travels to Athens on Monday to play Greece in its final warmup match ahead of the world championships.
"It was a great challenge and we should take this and run with it," Rose said.
Gasol had 17 points for Spain.