Denmark and Canada will divide small, uninhabited Hans Island in the Arctic, eding an almost 50-year ownership spat, in a largely symbolic act of diplomacy designed to avoid tensions in the high North.

The NATO allies have been engaged in a mostly good-natured squabble over the island, situated at equal distance between Greenland and Canada's Ellesmere Island, since 1971 when their rival claims came to light.

"As global security is being threatened, it's more important than ever for democracies like Canada and the Kingdom of Denmark to work together alongside indigenous peoples, to resolve our differences in accordance with international law, Canadian Foreign Minister Melanie Joly said in a statement.

Greenland is an autonomous territory within the Kingdom of Denmark. It leaves Copenhagen to manage certain policy areas, including foreign and security policy.

Canada and Denmark will divide the 1.2 square-kilometre (0.75 square miles) island into two almost equally large parts along a naturally occurring cleft on the rocky outcrop, according to a deal published by the Danish Foreign Ministry on Tuesday.

Some view the peaceful settlement as a sign of Arctic NATO states moving closer together since Russia's isolation over its invasion of Ukraine raised security concerns after decades of calm in the region.

"It really is a signal to the other parties with interests up there, that this is the way to do it. Whether that is realistic as long as Russia is involved, I don't know," military historian at the Royal Danish Defence College, Soren Norby, told Reuters.

The island is named after Greenlandic explorer Hans Hendrik, who took part in the first expedition to the island in 1853. It's called Tartupaluk in Greenlandic, which translates to "kidney shaped".

Neither country knew about the other's claim to the island until a bilateral meeting held in 1971 to discuss territorial boundaries.

Since the 1980s, officials, scientists and soldiers from Denmark and Canada have visited the island, taking turns at removing the other country's flag and raising their own.

It even became tradition for visitors to leave a bottle of either Canadian whisky or Danish schnapps for their rivals to find on their next visit, according to media reports.

In 2018, the two countries decided to establish a joint working group to resolve the dispute, ending their decades-long "agree to disagree" policy. The deal will be formally signed by ministers from both countries following parliamentary approval.

With the deal, Canada and Denmark have established the world's longest maritime border of 3,882 kilometres (2,412 miles) spanning from the Lincoln Sea in the North to the Labrador Sea in the South, the foreign ministry said.