Defending champions Serbia beat the Slovak Republic 68-67 to earn their place in Sunday's 5th-6th place game in the U18 European Championship for Women.
Tina Jovanovic hit a pair of free-throws with five seconds left to play and the hosts couldn't get a decent shot as the clock ran out.
Jovanovic finished with team-highs of 19 points and 14 rebounds.
The defending champions will face the winners of the Spain-Poland game on Sunday. Whoever wins that game will finish fifth and earn an automatic berth for next year's U19 World Championship for Women.
And Serbia head coach Zoran Kovavic felt quite confident his team were up to the task, one which has been their main goal all along.
"Our goal coming into this tournament was to qualify for that event," he said afterwards. "So we are closing in on that."
"If we face Spain in the 5th-6th place game, I think our team is good enough to beat them. They will not beat us twice in the space of a few days," he added in reference to his team's 76-64 loss against the Spaniards on Tuesday.
Veronika Cernakova hit a three-pointer with just over a minute left to give the hosts a 67-66 lead - their first since midway through the third quarter - but she then missed two free-throws with 13 seconds to play, leaving the door open for Serbia.
The Serbians ran the ball up court in a hurry and went to Jovanovic who was fouled and made good on her attempts from the charity stripe.
The Slovak Republic were always on top in the first half, taking a 34-31 lead at the break. But Serbia made their move in the third quarter. Jovana Popovic tied the game at 36 all and Zoran Kovacic's girls took their first lead of the game, 41-38, on Latinka Dusovic's three-pointer with 3:29 left in the period.
The 1.77m guard hit again from long-range minutes later for a 46-40 score as the Russians stayed in the lead until Cernakova's three-pointer late in the final period.
Spurred on by their fans, the hosts came back time and time again in the fourth quarter, tying the game once and coming within one on several occasions before Cernakova put them in front.
Martina Kissova had a 19 points and six rebounds for the Slovak Republic while Klaudia Lukacovicova had 16 points and 11 rebounds. Cernakova also had 16 points.