Krka Novo Mesto survived in a 78-75 thriller at KK Zagreb to seal their place in the EuroChallenge Last 16.
Zagreb had nothing but pride to play for after falling in their first four games in the competition.
They came out all guns blazing and almost treated their fans to a first victory.
With 6:59 to go, Zagreb had a 62-58 lead.
Krka's Chris Booker scored to spark a 14-4 run for the visitors and they stayed in front the rest of the way.
Zagreb got 22 points from Luka Zoric and 17 from Damir Mulaomerovic while Krka were led by Goran Ikonic's 23.
Krka head into the last week of play with a 4-1 record and the inside track to first place since they have a better goal differential than BK Prostejov (4-1), who have also sealed a place in the Last 16.
Krka and Prostejov split their two encounters.
Zagreb will go for win number one at Prostejov in the Czech Republic next week while Krka will be at home to Telekom Baskets Bonn.
Goran Ikonić, KK Krka player:
"I would like to congratulate the Zagreb players for their fairplay game. In the first half my team played a bit worse than in the second half when we played much better. We were lucky at the right moments and we deserved to win the game. The quality of our team is just in the number of good players who take the responsibility when needed. This has brought us a lot of wins this season. This time it was me next time somebody else, doesn't matter as long as we win."
Petar Babić, KK Zagreb player:
"Congratulations to Krka players for this victory and the qualification to the next round of this competition. We have quite a lot of problems playing defense, and without defense there is no good result in basketball. Tonight we have lost the game just because of bad defense. Krka is a good team and they punished all our mistakes. There were better tonight and I wish them a lot of success in the next round."
Aleksandar Džikić, KK Krka coach:
"I am satisfied with this victory since it confirms our qualification to the Last 16 of EuroChallenge. In the first half I tried to play with two younger players in the starting five, but it didn't work. Having a lot of good players opened the opportunity for us in the rest of the game to win. The timing of Luka Žorić decided the final result while our players managed to stay fresh till the very end."
Mladen Erjavec, KK Zagreb coach:
"Congratulations to Krka players on the victory and what will probably be first place in our group. They played intelligently and that was enough to win. We have had the same problem again which is bad defense. In our team there are a lot of offensive players, who do not play defense with the same enthusiasm. We let Krka too many shots and we had a very bad communication in the game. We practiced a lot to change these mistakes but it takes time, it just doesn't happen overnight. We did not play with enough energy and Krka deserved to win."