The Danish government expressed shock and disbelief on Wednesday over U.S. President Donald Trump's cancellation of a state visit to Denmark after its prime minister rebuffed his interest in purchasing Greenland.

Prime Minister Mette Frederiksen said at a news briefing she was "disappointed and surprised" at the cancellation.

But she added the close relations between the two allies would not be affected by the latest developments.

"The cancellation of the visit doesn't change the good relationship between Denmark and the United States," said Frederiksen, emphasizing military and commercial ties between the countries.

She also reaffirmed that Greenland, an autonomous Danish territory, is not for sale.

Mette Frederiksen tries to stress positives of U.S.-Denmark relations amid disappointment over cancellation. 2:16

Trump's proposal at first elicited incredulity and humour from politicians in Denmark, a NATO ally of the United States, with former premier Lars Lokke Rasmussen saying: "It must be an April Fool's Day joke."

But the mood turned to shock when Trump late Tuesday called off the Sept. 2-3 visit after Frederiksen called his idea of the United States buying Greenland "absurd."

"Total chaos with @realDonaldTrump and cancellation of state visit to Denmark. It has gone from a big opportunity for strengthened dialogue between allies to a diplomatic crisis," former foreign minister Kristian Jensen, a member of the opposition Liberal Party, said on Twitter.

"Everyone should know Greenland is not for sale," Jensen said of the world's largest island, which has considerable mineral wealth and a U.S. military presence at the Thule Air Base under a U.S.-Danish treaty dating to 1951.

Martin Lidegaard, a former foreign minister, told broadcaster TV2 it was "a diplomatic farce," and Trump's behaviour was "grotesque" and he was "throwing a hissy fit."

Cancellation amounts to 'an offence'

"It is very, very shocking, when it is about a very close ally and a good friend," Soren Espersen, foreign affairs spokesperson for the hard right Danish People's Party, told Danish news agency Ritzau.

He described Trump's cancellation as an offence to Queen Margrethe, Denmark's head of state, and said he did not expect another visit by the U.S. president would happen.

Trump and his wife Melania Trump were formally invited to Denmark by Queen Margrethe in July.

"It shows why we now more than ever should consider [fellow] European Union countries as our closest allies. The man is unpredictable," said Morten Ostergaard, leader of the Danish Social Liberal Party. "Reality surpasses imagination."

Greenland has attracted attention from global powers like the U.S., China, and Russia due to its strategic location and natural resources. (Getty Images)

Trump, whose "America First" policies have resulted in strained relations with the EU over trade and other issues, said Sunday that a U.S. purchase of Greenland would be "a large real estate deal," though not an immediate priority.

"Denmark is a very special country with incredible people, but based on Prime Minister Mette Frederiksen's comments, that she would have no interest in discussing the purchase of Greenland, I will be postponing our meeting scheduled in two weeks for another time," Trump tweeted on Tuesday.

Greenland, which is gaining attention from world powers including China, Russia and the U.S. due to its strategic location and mineral resources, is self-governing but depends on Denmark for economic support.

Aaja Chemnitz Larsen, a lawmaker from Greenland's Inuit Ataqatigiit opposition party, said she was not surprised at the cancellation, but it underlined the territory's importance.

"The U.S. is an interesting ally for Greenland, but we also wish for Greenland to remain in the union we have today," she told Reuters.

Denmark is a very special country with incredible people, but based on Prime Minister Mette Frederiksen’s comments, that she would have no interest in discussing the purchase of Greenland, I will be postponing our meeting scheduled in two weeks for another time.... —@realDonaldTrump

Greenland's premier, Kim Kielsen, declared on Monday it was not for sale and that while the island was drawing worldwide interest, anyone wanting to do business would have to respect its autonomy.

When Greenland was still a colony and the Cold War with the Soviet Union was escalating, the United States under then-President Harry Truman sought to buy the island as a strategic asset, but Copenhagen declined to sell.