WASHINGTON/COPENHAGEN (Reuters) - President Donald Trump declared Danish Prime Minister Mette Frederiksen’s dismissal of his idea to buy Greenland “nasty” and an affront to the United States on Wednesday, a day after shocking Danes by cancelling a Copenhagen visit over the rebuff.

Danes voiced disbelief at Trump’s decision to forgo the trip, although Frederiksen said she believed relations with the United States, a NATO ally, would not be affected.

Trump, who built his career as a businessman dealing in real estate, had mused openly in recent days about a U.S. purchase of Greenland, an autonomous Danish territory rich in natural resources, raising eyebrows in Europe and in the United States.

Former Danish Prime Minister Lars Lokke Rasmussen called it “an April Fool’s Day joke” and Frederiksen called the idea “absurd.”

The latter comment set off Trump, who often becomes riled up by criticism, real or perceived. He announced the cancellation of his planned Sept 2-3 trip to Denmark in a tweet late on Tuesday.

“I thought that the prime minister’s statement ... was nasty. I thought it was an inappropriate statement. All she had to do is say: ‘No, we wouldn’t be interested,’” Trump told reporters at the White House on Wednesday. “She’s not talking to me. She’s talking to the United States of America. You don’t talk to the United States that way, at least under me.”

Frederiksen, a centre-left Social Democrat, said she learned of Trump’s decision “with regret and surprise”, given Denmark’s strong relations with Washington, but she repeated her opposition to any Greenland transaction.

She stressed that Greenland’s premier, Kim Kielsen, had ruled out selling off the territory and “I obviously agree with him.”

But Frederiksen said the United States remained one of Denmark’s closest allies. “I don’t think the cancelling of this state visit should affect any decisions we make whether it is on commercial cooperation or foreign and security policies.”

Trump’s decision elicited condemnation, outrage and mockery alike among Danish opposition leaders and the public.

“So (Trump) has cancelled his visit to Denmark because there was no interest in discussing selling Greenland. Is this some sort of joke? Deeply insulting to the people of Greenland and Denmark,” tweeted former Prime Minister Helle Thorning Schmidt.

“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,” said former Foreign Minister Kristian Jensen of the Liberal Party.

‘NOT FOR SALE’

Slideshow ( 3 images )

Greenland, which is gaining attention from world powers including China, Russia and the United States because of its strategic location and mineral wealth, is self-governing but underdeveloped and relies on Denmark for economic support.

“Everyone should know Greenland is not for sale,” Jensen said of the world’s largest island, where the United States has a military presence at the Thule Air Base under a U.S.-Danish treaty dating to 1951.

“(Trump’s cancellation) is very, very shocking, when it is about a very close ally and a good friend,” said Soren Espersen of the hard-right Danish People’s Party.

Slideshow ( 3 images )

He said Trump had effectively snubbed Queen Margrethe, Denmark’s head of state. Trump and U.S. first lady Melania Trump were formally invited to Denmark by the queen 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.”

Trump, whose “America First” policies have resulted in strained relations with the EU over trade and other issues, said on Sunday a U.S. purchase of Greenland would be “a large real estate deal.”

The two countries appeared to be taking steps to address tensions over the dispute.

Danish Foreign Minister Jeppe Kofod said in a Twitter post that he had a “frank, friendly and constructive talk” with Secretary of State Mike Pompeo and declared the countries “close friends and allies.”

The State Department said Pompeo expressed thanks for Denmark’s cooperation as an ally. “The Secretary and Foreign Minister Kofod also discussed strengthening cooperation with the Kingdom of Denmark – including Greenland – in the Arctic,” it said in a statement.

Trump said he would go to Denmark another time.

“Greenland was just an idea, just a thought. But I think when they say it was ‘absurd’ and it was said in a very nasty, very sarcastic way, I said, ‘We’ll make it some other time.’ We’ll go to Denmark - I love Denmark. I’ve been to Denmark. And, frankly, we’ll do it another time. Respect has to be shown to the United States,” he told reporters.

Anders Fogh Rasmussen, a former NATO secretary general and Danish premier, said Trump’s cancellation could work out for the best. “The Arctic’s security and environmental challenges are too important to be considered alongside hopeless discussions like the sale of Greenland,” he said on Twitter.