Spain broke open a fierce defensive battle in the final minute to beat France 66-59 and reach the semi-finals of the Olympic men's basketball tournament in a bad-tempered contest.

Back-to-back fouls for unsportsmanlike behaviour were assessed against France's Ronny Turiaf and Nicolas Batum after hard hits at the end of the game, and players from both teams had to be restrained by officials from going after each other.

Marc Gasol led Spain with 14 points, while Tony Parker and Boris Diaw scored 15 points apiece to pace France.

Russia made the most out of their size advantage to beat Lithuania 83-74 and advance to the semis against Spain.

Lithuania, plagued by periods of ice-cold shooting, battled back from a 13-point deficit late in the third quarter with an 11-2 run that made it 54-50 going into the fourth quarter.

A three-pointer by Rimantas Kaukenas made it a one-point game at 54-53 before the Russians recovered with center Timofey Mozgov and veteran forward Andrei Kirilenko leading the way.

Kirilenko led Russia with 19 points and Mozgov scored 17, most of them coming on dunks and put-backs from under the basket.

Kaukenas scored 19 points to lead Lithuania, who made one last push to close within five points at 74-69 with two minutes left before Russia secured victory from the foul line.