Hungary whipped the Czech Republic 70-55 on Monday in Szolnok to secure their place in Division A of the EuroBasket.
The outcome has left both sides with 3-2 records in the four-team EuroBasket Relegation Round.
Ukraine won in overtime at Estonia on Monday and are also 3-2.
If Hungary fail to prevail in their last game at Estonia on Thursday and end up finishing 3-3, they will still clinch second place as they win potential tie-breakers against the Czechs and Ukraine on superior goal differential.
Therefore, the winner of the Czech Republic's game at Ukraine (3-2) on Thursday will determine the other team to remain in Division A.
Estonia have been relegated after claiming just one victory in their five games so far.
In Monday's action, Akos Horvath had a game-high 21 points for the Hungarians, who also got 12 points and eight rebounds from Péter Lóránt.
A blowout didn't look to be on the cards early on when the Czechs' Ladislav Sokolovsky split a pair of free-throws to knot the contest at 7-7.
Horvath, whose previous high in the Relegation Round had been five points in the defeat to the Czechs, then took over.
He drilled two straight three-balls and Gergely Körtélyesi buried another for a 9-0 run that gave Hungary a 16-7 lead late in the first quarter.
The advantage ballooned to 35-16 with 2:41 to go in the second quarter after a lay-up by Lórant.
With the Czechs starting to dig themselves a giant hole, Hungary went for the kill.
Tamas Kaman's three-pointer at the end of the third quarter gave them a 62-37 stranglehold on proceedings.
The Czechs managed to outscore Hungary 18-8 over the last 10 minutes but that mattered very little.