LONDON -- Spain lost to Brazil, then had to play defense.
Questioned if they played to win, the Spaniards insisted they didn't intentionally lose their final Olympic preliminary round game to Brazil in order to avoid an earlier matchup with the U.S. in single-elimination play starting Wednesday.
"No. Never," said Spain guard Jose Calderon. "This is not our team, this is not the way we play, this is not the way. We've been together since I don't know how many years, and we always play to win. Always."
Leandro Barbosa scored 10 of his 23 points in the final six minutes, rallying Brazil to an 88-82 win over the Spaniards in a matchup of two medal contenders who could eventually challenge the Americans for gold.
Barbosa scored 20 points in the second half for Brazil (4-1), which trailed by 10 early in the fourth quarter. But the super-speedy Barbosa, who now plays for the Toronto Raptors, made a pair of 3-pointers and four free throws in a 12-2 run as Brazil finished second in Group B.
Spain is assured of not playing the U.S. (5-0) until the gold-medal game -- that is if both the Spaniards and Americans continue to advance and get back to the final for the second straight games. The U.S. beat Spain for the gold medal four years ago in Beijing.
Behind Kevin Durant's 28 points, the U.S. concluded pool play with a 126-97 win over Argentina, which will play France in the quarterfinals.
In the other medal-round matchups, the Americans plays Australia (3-2), Spain plays France in a rematch of last year's European championship, and Russia (4-1) plays Lithuania (3-2).
Pau Gasol isn't concerned about who Spain meets next.
"The way we're playing right now, anybody could beat us," Gasol said after he and his teammates finished pool play with losses to Russia and Brazil.
Brazil, which would face Argentina on Wednesday if the U.S. wins as expected Monday night, played without 6-foot-11 starting center Nene. He sat out with foot soreness.
Nene, traded to the Washington Wizards last season, has been bothered by plantar fasciitis and Brazil decided to rest him for the upcoming medal round.
Leading into the game, there had questions whether Spain or Brazil might sit players and not try to win to avoid facing the U.S. until there was gold up for grabs. Eight badminton players were recently expelled from the London Games for trying to lose and the IOC is keeping a close eye to ensure the Olympic creed "to have fought well" is upheld.
Spain forward Felipe Reyes said the pregame suspicions impacted the world's second-ranked team.
"Of course it bothered us," he said. "We're professional players and we always want to win. The press were talking about that and it affected us. Now we have to forget this and focus on what comes next."
The Brazilians played hard -- no questions.
They trailed 67-57 early in the fourth quarter, but began chipping into Spain's double-digit lead while the bearded Gasol brothers sat on the bench.
Barbosa made two free throws to pull Brazil within 73-69, and then hit consecutive 3-pointers to put his country ahead 75-73 with 4:16 remaining. Marc Gasol fed his brother in the lane for a nice basket underneath, and Pau Gasol hit a free throw on Spain's next trip to make it 79-76.
But after Anderson Varejao's free throw, Barbosa got behind Spain's defense and scored an easy layup to give Brazil an 82-76 lead.
"We wanted to win," said Brazil's Alex Garcia. "We played to win."
Spain got within five points but was sloppy in the final two minutes and suffered its second straight defeat in pool play after losing to 77-74 to Russia on Saturday.
Among the 12,000 fans watching in the first half was the U.S. team. LeBron James and his teammates sat in the stands and took mental notes before playing rival Argentina in their final tuneup before the quarters. The Americans beat both Brazil and Argentina in an exhibition tour leading up to London.
Australia 82, Russia 80Patty Mills' 3-pointer with time expiring gave Australia an 82-80 win over Russia.
Australia (3-2) clinched fourth in its group and could face the U.S. team in the quarterfinals Wednesday if the Americans beat Argentina in their game Monday night.
Russia (4-1) had already clinched the top spot in Group B.
Australia led for most of the game but Vitaliy Fridzon's two free throws gave Russia an 80-79 lead with four seconds left.
Mills, who missed a 3-pointer with less than a minute remaining, got the ball at the top of the key and nailed the game-winner.
Joe Ingles had 20 points to lead Australia and Mills added 13.
Lithuania 76, Tunisia 63Renaldas Seibutis sparked a fourth-quarter comeback by Lithuania, hitting two consecutive 3-pointers in a win over Tunisia that put Lithuania in the quarterfinals of the tournament.
Seibutis' 3s gave Lithuania a 63-56 lead with 4:45 remaining in the game. Lithuania, which trailed 54-50 at end of the third quarter, outscored Tunisia 26-9 in the fourth.
A gritty Tunisia squad had a chance to advance with a win but ran out of gas down the stretch.
Mantas Kalnietis helped put the game away with a 3-pointer a pair of free throws.
Amine Rzig led Tunisia (0-5) with 17 points.
France 79, Nigeria 73Nicolas Batum scored 23 points to lead France past Nigeria.
France will finish no worse than third in Group A.
Batum nailed a 3-pointer to put France up 65-62 and the French (4-1) never trailed again after Nigeria had battled back from an 11-point halftime deficit.
The Portland Trail Blazers standout hit two more 3s down the stretch. His 3-pointer with 2:38 to play gave France a 75-68 lead and he drained another for 79-70 France advantage. Batum also had six rebounds.
Chamberlain Oguchi went 8 for 14 from 3-point range to finish with 35 points for Nigeria.
Britain 90, China 58
Kieron Achara scored 16 points and Britain sent the home fans into a frenzy by winning its first men's basketball game in the Olympics since the 1948 London Games, beating China 90-58 on Monday.
Nate Reinking added 12 points for Britain in the last game of the tournament for both teams.
Britain (1-4) had not qualified for the Olympics since 1948, but received a berth as the host this year.
In 1948, Britain beat Ireland for its only win, 46-21. Ironically, the Britons lost to China 54-25 in those games.
Wang ZhiZhi led China (0-5) with 11 points.
Information from The Associated Press was used in this report.