In front of a home crowd of 3,927, Robert Rooba boomed in Estonia´s winner on powerplay 1:22 into overtime to down Ukraine 4-3.
Estonia came tantalisingly close to equal last year´s bronze medal from Division IB Kaunas. A win in regulation time would have been needed in order to leapfrog Japan for the third spot.
Trusted veterans Aleksandr Petrov and Roman Andrejev also tallied for Estonia, while 21-year-old Mark Viitanen scored his first World Championship goal as Estonia outshot their opponents 38-17.
"Bronze once again would surely have tasted nice, still it was a good fight and a nice win in front of our home crowd," said Estonia´s Riho Embrich.
"The expectations were a bit higher this year. The last few games we played well, so the feeling is overly positive, We have moved forward during the last few years and can now fight for a medal each year."
Ukraine appears to be on a slippery slope. Their fifth place finish in Tallinn is their lowest overall position since they entered World Championship play in 1993. Against Estonia, they fizzled out spectacularly as the game wore on.
Ukraine went two up just 20 seconds later when Vitali Lyalka picked up speed from defensive zone brushed past Embrich, gathered speed to weave past Filipp Svarogin and Saveli Novikov before slipping it through Koitmaa´s pads.
But the home crown inside Tondiraba Icehall was up on their feet soon after as Estonia pull one back. Petrov slotted home a rebound from Andrei Makrov´s drive after Ukraine´s goalie Bogdan Dyachenko had been barged down by his own defence at 3:51.
Andrejev was serving tripping call when Sergi Babynets fired past Villem-Henrik Koitmaa five minutes left of the first frame.
Ukraine´s Dmytro Nimenko missed a golden opportunity to stretch Ukraine´s lead when Koitmaa saved his penalty shot 5:28 into the second frame.
Then Estonian hopes are restored with 36 seconds left of the frame. Riho Embrich, with the puck at the bottom of the left faceoff circle, found Viitanen in the slot who reacted before Ukraine´s blueliner Pylyp Pangelov-Yuldashev to fire past Dyachenko.
Carried forward by their home passionate home crowd, Estonia won the shots 13-1 in the final frame as they surged ahead looking for an equalizer.
Petrov won a draw and charged with the puck round Ukraine´s net before turning and hitting a pass to Dyachenko´s front post where Andrejev tied the game at three with 8:56 go to.
Koitmaa was pulled from the net with 37 seconds to go as Estonia pressed for another goal in regular time which would win them bronze. Instead, they had to settle for fourth despite Rooba´s wrister in overtime grabbing them an extra point.
"We are close for bronze, but small things have been decided in the race for medals this year, but I would like to say it is the closest tournament this far in terms of the quality of the teams. We showed that we are able to play against anyone in this division and that is a big thing," said Estonia head coach Jussi Tupamaki.