Updated

Russia beat Macedonia 63-61 on Sergey Monya's 3-pointer at the buzzer Monday, setting up a quarterfinal with Serbia at the European basketball championship.

Russia finished first in the second-round Group E and avoided host Lithuania in the quarters. Macedonia will play Lithuania. Russia and Macedonia were already assured of places in the last eight.

Earlier, Slovenia claimed the final quarterfinal spot with a 67-60 victory over Finland and will next play defending champion Spain. Greece topped Georgia 73-60 in another Group F game. Greece had already qualified and will meet France in the quarters.

The quarterfinals start Wednesday in Kaunas. Spain and Slovenia open the series, with Macedonia and Lithuania also playing Wednesday. The other two quarterfinals are Thursday.

The two finalists of the tournament gain automatic slots at next year's Olympics in London. The next four teams will advance to an additional 12-nation qualifying event before the games. From that competition, three will make it to the 12-nation Olympic tournament.

Finland trailed for most of the game but made it a four-point game with 32 seconds remaining. It then wasted two possessions before point guard Goran Dragic of the Houston Rockets sank two free throws to put the game away.

"It was a big game and we are very disappointed," Finland forward Tuukka Kotti said. "We had terrible rebounding and a lot of missed layups. We just couldn't get any offensive rebounds."

Center Erazem Lorbek led Slovenia with 14 points and Uros Slokar added 13 and eight rebounds.

"We took away their main weapon, the 3-point shot, and we took the rebounds," Slovenia coach Bozidar Maljkovic said. "We didn't let them play their game."

Petteri Koponen had 14 points for Finland, which was trying to reach the quarterfinals for the first time.