Ukraine won the 2016 IIHF Ice Hockey World Championship Division I Group B in Zagreb after a helping hand from hosts Croatia.

Croatia edged Lithuania 2-1 after penalty shots in an pulsating thriller of a game, which saw Ukraine finish top of the table to move up to the 2017 IIHF Ice Hockey World Championship Division I Group A.

Great Britain finished second while Lithuania won their third consecutive bronze medal at this level.

With the medal race being wide open ahead of the final game of the tournament between Lithuania and Croatia, Ukraine watched the drama unfold from the edge of their seats.

During an exciting day of final day action, Ukraine had earlier ousted Great Britain in a three-goal thriller. Now Ukraine were rooting for Croatia to get a point off Lithuania in their final game, which would mean gold medals and a straight return to Division IA for the Ukrainians.

Going into the final game between Lithuania and Croatia, both teams were stepping out on the ice chasing a regulation team win. Surprise package Lithuania had a sensational gold medal within their reach, while Croatia chased a bronze model to cap off a successful tournament as hosts.

Add to the mix Great Britain who after their heartbreaking final day loss against Ukraine, also kept their fingers crossed for Croatia to take a point to win silver.

In the pulsating end-to-end game with chances aplenty at both ends, Croatia drew first blood with 49 seconds to go of the first frame.

Lithuania's Rolandas Aliukonis was serving a hooking minor, when Kevin Brine, from centre ice picked out Michael Glumac trundling down on his right. He staved off a challenge by Daniel Bogdziul and unleashed a wrister from the right point past Artur Pavliukov in Lithuania's net.

Roared on by 2,500 fans inside the Dom Sportova, the second period saw Croatia win the shots 10-4 and also have the best chances. Perkovich squandered a chance following a pass from Borna Renulic behind Pavliukov's net. Ivan Puzic then hit a long range pass to Glumac who did all the hard work right, but failed to hit the target once he got past Pavliukov with the goal at his mercy. In a period which finished goalless Lithuania also came close when Neijus Alisauskas with the puck in the slot decided to look for a pass instead of firing one of his trademark bullets.

The level of excitement rose up yet another notch during the final frame. After Lithuania showed great spirit to get through a 3-on-5 boxplay they soon after hit on the break to pull the game level at 5:41. Bogdziul picked up the puck along the left boards ahead of Croatia's Marko Tadic, to pick out Donatas Kumeliauskas in front of net who made no mistake with a shot past Vilim Rosandic for 1-1.

As the Ukrainian players sitting in the stands got more nervous for each Lithuanian attack, a golden chance to win a sensational Baltic gold medal presented itself with two minutes left of the game. The influential Bogdziul picked out Arnoldas Bosas clear in the slot who saw Rosandic keep the puck out of his net with a marvellous blocker save.

With the final seconds ticking down fast, the cheers from revelling Ukrainian players and supporters in the stands were in sharp contrast to the mood out on the ice after 60 minutes, as 1-1 meant both sets of players left wondering over what could have been.

Looking at it from a wider perspective and once the dust had settled, both sets of head coaches preferred to focus on the many positives at their post-match interviews.

"It was a great hockey game. The fans like it, and in the end if you win, everybody goes home happy. But we came here with the intention of not going down. I missed eleven players that should be here," said Lithuania coach Bernd Haake.

"The boys were working hard, disciplined, both yes and no, but this is an emotional game. Today the outcome could had been different, but overall to win a bronze medal is a big success for Lithuania, even though we had the chance to win a gold, but that is almost out of our reach. I am very happy with a medal."

While Croatia in the end beat Lithuania on penalty shots, head coach Alan Letang hopes the experience from their fourth place finish can come in good stead in the future for his young fledging team.

"It hurts, because throughout the tournament they have given me everything," he said. "They wanted to win, they wanted a medal and they deserved it, but both teams did really, and it is not an easy tournament to play in, it is game after game, and I think our young kids will be better for this experience."