Bob Hartley will remain as Latvia's head coach ©Getty Images

Canadian Stanley Cup winning coach Bob Hartley has signed an extended deal to remain in charge of the Latvian men's ice hockey team.

The 56-year-old has agreed terms for another five years which will include attempting to qualify for the Beijing 2022 Winter Olympics.

Stanley was appointed in December 2016 after Latvia failed to qualify for the Pyeongchang 2018 Winter Games in September of that year.

He replaced Haralds Vasiljevs who took charge of the country following Leonids Beresnevs' resignation shortly before the unsuccessful effort at the Olympic Qualifying Tournament, which Latvia hosted themselves in Riga.

They lost 3-2 to Germany in the decisive group game with the visitors qualifying for the Games in South Korea instead.

Stanley was in charge at the International Ice Hockey Federation (IIHF) World Championships in Paris and Cologne in May, where Latvia won three matches in the group stage, narrowly missing the quarter-finals and finishing 10th overall.

Latvia failed to qualify for the Pyeongchang 2018 Winter Olympics ©Getty Images
Latvia failed to qualify for the Pyeongchang 2018 Winter Olympics ©Getty Images

Hartley's new deal was confirmed at the Latvian Hockey Federation (LHF) Congress by LHF President Aigars Kalvitis.

He can now look ahead to the 2018 IIHF World Championships in Denmark.

In 2001, Hartley won the National Hockey League's (NHL) top prize the Stanley Cup with Colorado Avalanche.

He also coached NHL sides Atlanta Thrashers and Calgary Flames.