Istvan Nemeth poured in 27 points to help fire Hungary past Bulgaria and keep alive their hopes of reaching the next stage of the additional qualiying tournament in Spain.
The Bulgarians could have won for the third time in four games, but lost 74-67.
Bulgaria pulled even with Bosnia and Herzegovina in Group A additional qualifying Saturday night with a crucial 70-69 win that was in doubt until the very end with poor free throw shooting dooming the group leaders.
Bosnia and Herzegovina had the better of the action early on but could never really pull away thanks to a balanced scoring effort by the Bulgarians led by Roderick Blakney, Todor Stoykov and Kaloyan Ivanov who accounted for 24 of their teams 33 points at half-time.
Five missed free throws in the last 17 seconds sent Hungary crashing to a 79-74 defeat at Bulgaria on Saturday evening.
In one of the most thrilling games in the additional qualifying tournament for EuroBasket 2007 so far, the Bulgarians, beaten in overtime at Bosnia-Herzegovina in midweek, were in danger of a second straight setback.
Bosnia & Herzegovina were pushed to the limit by Bulgaria but survived 75-71 in overtime to get their additional qualifying tournament for EuroBasket 2007 on track.
In a battle of national sides that played at the EuroBasket two years ago, hosts Bosnia & Herzegovina looked to be on their way to victory midway after going on a 7-0 run to lead 65-58 with 2:33 remaining.