Another outside score by Vida then handed the visitors the lead at 34-31 and the same player then scored just before the interval to give her team a 43-38 advantage.
An 11-4 burst at the beginning of the third by Montenegro then ensured the momentum swung back the way of the hosts and when they stretched their advantage to 59-49 it looked like a long way back for Hungary.
However they scored eight points in double quick time to make it a one-shot game and set up a thrilling final few minutes.
When Ana Baletic made it 67-59, it again looked near to done and dusted but again Hungary showed great resilience and led by Fegyverneky, they got back into the game as Dora Horti tied the scores at 71-72 with just over a minute to play.
Baletic and Jelena Skerovic then made vital free-throws as Montenegro scraped home and took one step closer of realising their dream of a place at a first ever EuroBasket Women.
Jelena Dubljevic led the way for Montenegro with 21 points and five assists while Iva Perovanovic finished with 18 points and nine rebounds.
Montenegro coach Miodrag Baletic:
"This is a big triumph and a big day for us. The girls made a great effort. Every player deserves recognition and respect for all the things they have achieved."
Montenegro captain Jelena Skerovic:
"It was a very difficult game, but we managed a big win. We had been feeling the tension because this game was very important for us. We made a lot of mistakes. But [we won also] thanks to the fans and because of how they supported us all they time; they've been our extra player."