The U.S. men's basketball team won a close game to clinch gold Sunday morning, edging out Spain 107-100.

Going into the Olympics, it was widely believed the U.S. would win gold. But Spain’s team kept the U.S. players on their toes -- the two teams were just points apart throughout the game, with the U.S. ahead 83-82 at the end of the third quarter. The U.S. managed to pull ahead in the fourth to secure victory.

The U.S. was led by Kevin Durant's 30 points. LeBron James contributed 19 points and Bryant scored 17 for the Americans.

"This game was fun. It was a challenge, but we stepped up to it," Kobe Bryant told NBC.

This year’s contest was a rematch of the Beijing games' final. Both sides boast NBA players, including Kobe Bryant, LeBron James, Kevin Durant, Tyson Chandler, James Harden and Russell Westbrook, for the USA and Pau Gasol and Serge Ibaka for Spain.

The U.S. men’s basketball team has won gold in every summer Olympics since 1992 except the 2004 Games in Athens, when Argentina won gold and Italy scored silver. The U.S. took home bronze that year.

Earlier Sunday, the Russian basketball team beat Argentina 81-77 for the bronze.

Copyright IB. CNN Newsource contributed to this report.