Russia stretched their perfect record at Eurobasket to eight games and finished top of Group F in the second stage of the tournament with a dramatic 63-61 win against Macedonia.

Holders Spain and Slovenia, who clinched their berth in the last eight with a 67-60 defeat of Finland earlier on Monday, open the knockout stage in Kaunas on Wednesday followed by Macedonia's clash with hosts Lithuania.

Russia were staring at defeat for the second time in the tournament but forward Sergey Monya again came to their rescue with a last-gasp three-pointer which beat the buzzer after it went in off the backboard.

It was a carbon copy of Monya's game-winning shot against Slovenia in the preliminary stage, when Russia edged the former Yugoslav republic 65-64 having trailed throughout the contest.

The Macedonians looked like snatching a seventh straight win after romping to an early 8-0 lead but Russia turned the tide with strong defending and seemed to be in control after taking a 58-51 lead at the start of the fourth quarter.

They managed only one field goal in the following eight minutes and Macedonia, led by American-born point-guard Lester Bo McCalebb, took advantage.

McCalebb, who finished with a game-high 16 points, nailed a pair of free throws with four seconds left to give his team a 61-60 lead before Monya hit a difficult baseline jump-shot to beat the clock.

Slovenia won their dogfight against Finland for the last remaining quarter-final berth thanks to a more talented outfit which played in fits and starts and survived a late scare after they nearly blew an 11-point lead.

Having lost three games in a row after winning the opening four, Slovenia came out with purpose and appeared to be heading for a comfortable win after they earned a 60-49 advantage early in the final period.

Their offence then came to a screeching halt as the Finns cut the deficit to 64-60 in the closing stages and missed a series of easy lay-ups before Goran Dragic sealed Slovenia's victory with three free throws in the final minute.

"It wasn't easy to deal with three defeats in a row and hence we have to be content with just beating Finland although our performance left a lot to be desired," said Slovenia's centre Erazem Lorbek.

Coach Bozidar Maljkovic added: "I don't want to elaborate how difficult it will be to beat Spain because that would devalue the success of reaching the last eight."

"Spain are the strong favourites to win the tournament but on the day anything can happen and we will face them with a lot of confidence," said forward Uros Slokar.

Lorbek led the Slovenians with 14 points, Slokar added 13 and eight rebounds while point guard Jaka Lakovic scored 11.

Greece, who were already assured of finishing third in the group and playing France for a berth in the semi-finals, beat eliminated Georgia 73-60 as both teams went through the motions.