Brazil clinches second place in Group B after they defeated Spain 88-82 in the final preliminary game before the quarterfinals begins.
Leandro Barbosa led Brazil with 23 points, scoring 10 in his final six minutes.
Barbosa also scored a total 20 points in the second half for Brazil, after trailing Spain early by 10 in the fourth quarter.
Brazilian center Nene sat out the final preliminary round game due to foot soreness. Anderson Varejao and Tiago Splitter took the bulk of Nene's duties as they guarded Spain's Marc and Pau Gasol.
Pau Gasol led Spain in scoring with 25 points and his brother Marc contributed 20.
Spain now falls into third place in Group Band is now assured of not playing the U.S. until the gold-medal game, if they and the Americans continue to advance and both get back to the Olympic final again.
The U.S. beat Spain in the title game at the 2008 Beijing Games.
The U.S. will wrap up their pool play this afternoon when they take on Argentina (3-1). They remain undefeated with a 4-0 pool record after most recently defeating Lithuania 99-94 in what was a very closely contested game.
Exact quarter-final matchups will not be known until after the U.S. play Argentina.