They came from two goals down to win the game in added time, with Mario Pugliese scoring the winner in the dying seconds.
Beka Vachilberadze put Ukraine ahead midway through the second half but were pegged back by Vittorio Parigini’s close range effort at the back post. Pugliese scored the winner from a very tight angle, which saw Ukraine’s exit from the competition after two straight defeats.
Elsewhere in the group, Russia drew with Croatia to leave the Russians top of the group on level points with Italy and Croatia third place with 2 points. Croatia will have to beat Ukraine in their final fixture whilst hoping their is a winner in the game between Russia and Italy.
Hosts Slovakia remain top of Group A and on the brink of qualification after they drew with Switzerland. They showed character to come back from two goals down, with strikes from Atila Varga and Martin Slaninka’s second of the tournament proving the difference after Robin Kamber and Martin Trachsel, who was later sent off, put the Swiss ahead.
Sweden are also close to progressing to the semi-finals after they fought out a draw with Austria.
Two quickfire goals at the start of the second half was the best of the action as Ali Suljic put Sweden ahead before Nikola Zivotic equalised not long after.
The result sees Sweden and Slovakia playing each other on the final matchday knowing that a draw would suit both sides and see them both through.