BC Gala Baku gave themselves a fighting chance of joining Group H opponents Ural Great in the next phase of the EuroCup Challenge after clinching their first win against Khimik.
Darius Lukminas had 24 points to lead Gala, who trailed by two points entering the final quarter but prevailed 86-81.
Rimas Kurtinaytis, the Gala coach, said: "Our team showed the will for the win tonight.
"With three of our players fouled out, we kept fighting and won the game. Aleksandr Rindin was great tonight, he really turned the game for us with his defensive effort."
Khimik, a Ukrainian side with a big height advantage against Gala, began the game well and led by as many as eight early in the contest.
But Gala's pressure, man-to-man defence helped them get back into the contest and when Gedrius Kurtinaytis hit a spectacular shot at the buzzer, Khimik had cut the deficit to four points after the first quarter.
Gala decided to switch to an active zone defence in the second period and that threw the visitors out of their rhythm. When the teams went to the changing room at half-time, the hosts looked in good shape.
Offensively, they had gotten a lift from Anar Sariyev, Kurtinaytis and veteran Lukminas who combined to make nine three pointers as Gala led 40-31.
Khimik started the second half, with Dubravko Zemljic inspiring his team-mates on both ends of the floor.
The guests played so well that they managed to reclaim the lead at 59-57.
The fourth period belonged to Jamel Bradley and Aleksandr Rindin.
The American point guard of Gala, Bradley, made jump shot after jump shot and 2.23m center Rindin provided an intimidating presence in the paint, blocking four shots while also throwing down two thunderous dunks in a 13-0 run near the end of the game.
Zvezdan Mitovic, the Khimik Yuzhny coach, was ejected with two minutes left in the contest after arguing against an offensive foul that was drawn by Zaur Pashayev.
Lukminas hit four free throws to clinch the victory.
BC Gala travel to to Perm, Russia, to face Ural Great on November 24 and will advance to the eighth-finals with a victory.