Hungary claimed their first IIHF Ice Hockey World Championship win in 77 years by beating fellow-strugglers Belarus 5-2 in St. Petersburg.
Not since an 8-1 rout of Belgium way back in 1939 had Hungary savoured a victory in this tournament, but their wait finally came to an end on Saturday.
Janos Vas struck twice, while Krisztian Nagy, Balazs Sebok, and Vilmos Gallo were also on target in a long-awaited triumph which boosts their hopes of avoiding relegation.
Defeat for Belarus, now level on three points with Hungary, leaves them fearing the drop ahead of their final Group B match against France on Tuesday.
Geoff Platt and Artur Gavrus were on target for Belarus in a losing cause.
Kazakhstan were relegated from Group A following a 2-1 defeat against Latvia.
Maris Bicevskis scored the winner in the third period to send Kazakhstan down to Division I-A and keep Latvia's quarter-final hopes alive.
Ivan Telegin scored two as second-placed Russia got the better of Switzerland 3-1 in Group A, while third-placed Sweden beat Norway 3-2.
Canada and Finland maintained their perfect records in Group B with victories over Slovakia and France respectively.
Taylor Hall bagged a double, while Matt Duchene, Mark Scheifele and Morgan Reilly scored as Canada made it five wins from five with a 5-0 triumph over a Slovakia side that has now lost three in a row.
Finland saw off France 3-1 courtesy of strikes from Patrik Laine, Aleksander Barkov and Esa Lindell.