The final match of the International Ice Hockey Federation (IIHF) Olympic pre-qualification round three Group H event was a head-to-head battle to decide which team progressed.
It followed both Kazakhstan and Poland having won their early matches against the Netherlands and Ukraine at the Barys Arena.
Kazakhstan were stunned in the seventh minute of the match when Bartosz Ciura gave Poland a 1-0 lead.
Martin Przygodzki doubled Poland’s advantage early in the second period, but two strikes from Dustin Boyd in a five-minute period saw Kazakhstan hit back to level the match.
Poland regained the lead early in the final period when Maciej Urbanowicz found the net.
Kazakhstan were unable to muster a response in the closing minutes, as Poland secured the 3-2 win to top the group and reach the final round of Beijing 2022 qualification.
Ukraine finished the group stage on a high by beating the Netherlands 3-0 to place third in the standings.
Britain and Hungary met in a decisive match in Group J in Nottingham with the winner also taking their place in the final round of Olympic qualifying.
Hungary took the lead early in the second period through Bence Stipsicz before Csanad Erdely doubled their lead later in the period.
Early in the third period, Britain gave themselves hope when Matthew Myers reduced the arrears to make it 2-1.
Five minutes later Janos Hari restored the Hungarians two goal lead before Istvan Sofron made it 4-1 and sealed Hungary’s place in the final qualifying round.
Estonia and Romania have already been eliminated, but completed their Group J campaign by playing each other in a dead rubber which the Romanians won 7-3.
Hosts Slovenia and Japan also met in a crunch Group G qualifier in Jesenice with Slovenia running out 6-2 winners in an entertaining affair.
Shogo Nakajima gave Japan the lead in the first period before Jan Urbas levelled for Slovenia in the second period to make it 1-1.
The hosts got off to a flying start early in period three with two goals in two minutes from Ken Ograjensek and Robert Sabolic making it 3-1.
Goals flew in during the final five minutes as Slovenia initially made it 4-1 through Rok Ticar before Nakajima scored his second of the game a minute later to give Japan hope at 4-2.
Ticar scored his second of the game 30 seconds later to make it five before Miha Zajc rounded off a convincing final quarter for the hosts to make the final score 6-2.
Miklos Rajna was the star in net with a 47-plus save performance. Hungary defeat Great Britain 4-1 to secure a place in the Final Olympic Qualification.
Poland, Hungary and Slovenia will now progress to the final qualifier.
Each of the top teams from the final three qualifying groups will go forward to the Beijing Olympics.
Hosts China are already assured of a place and will be joined by the top eight teams in the world rankings following last year’s World Championships.
They are, in order, Canada, Russia, Finland, Sweden, Czech Republic, United States, Germany and Switzerland.