Spain extended their winning streak to three, reaching the Rio Olympics men's basketball quarter-finals with a 92-73 win over Argentina.
Pau Gasol turned in a double-double for his best showing yet in Rio, with 19 points, 13 rebounds and a pair of blocks.
Spain's win also determined the fate of host nation Brazil, who were eliminated despite a do-or-die 86-69 victory over Nigeria.
And Croatia beat Lithuania 90-81 to top Group B, as the top four finished on eight points.
Croatia will face fourth-placed Serbia from Group A in the quarter-finals. Lithuania play Australia in the knockout stage, Argentina will face the United States and Spain take on France.
HIGHLIGHT
Gasol stepped up when Spain needed him, with his 19-point haul crucial in his side's vital win.
MVP OF THE DAY
Croatia's Bojan Bogdanovic shot 11-for-19 from the floor for 22 points against Lithuania. He finishes as the top scorer in group play, averaging 24.8 points per game.
QUOTES
"The first step is done. We wanted to be in the quarter-finals again, it's really the Olympics for us now and this is important for this generation," - Spain's Jose Calderon on advancing.
"It's a difficult match-up [France] that we know well. They beat us two years ago, we beat them last year, and now we face them again in a critical game like the quarter-finals. We'll have to prepare and see who wins this time," - Gasol on facing France in the knockout stage.
WHAT'S NEXT?
USA's women take their undefeated record into the elimination round, beginning with Japan. Also on Tuesday, fellow unbeaten side Australia start the day against Serbia followed by Turkey against Spain and Canada against France. Men's quarter-finals are played on Wednesday.