The Danish prime minister’s office did not immediately return a call on Friday seeking comment.

Social media users were quick to exploit the report about the American president’s exploring the purchase of Greenland. One photoshopped a pompous-looking golden tower into a picture of Greenlandic villages with colorful two-story wooden houses. Another asked if Denmark could trade Greenland for Hawaii.

But at the center of the international contretemps, there was little to laugh about, politicians and residents said.

“It’s never nice to be treated as a commodity,” said Aaja Chemnitz Larsen, a Greenlandic member of the Danish Parliament.

Greenland, a nation of 56,000, has a shared history with Denmark since the first Vikings settled there a millennium ago. If that relationship were to change, it would not be up to Denmark and certainly not up to an American president’s “impulse,” said Henrik O. Breitenbauch, an expert on Greenland and the head of the Center for Military Studies at Copenhagen University.

“You don’t just trade people and countries,” Mr. Breitenbauch added.

The speculation is that Mr. Trump, a former real estate developer, was keen on Greenland because he tends to see the world through a prism of acquisitions. And Greenland, located among both friendly and hostile neighbors, has everything a real estate investor could desire in terms of fresh air, direct access to the sea, an abundance of shrimp, cod and halibut and a backyard rich with lucrative minerals.

Nearby international sea routes allow for quick passage to all corners of the globe (when the ice permits). But the island’s population may see little to gain from exchanging the Danish queen as their head of state with an American president who has angered traditional allies by disparaging NATO and pulling the United States out of long-held treaties like the Paris climate accord.

“Greenland could choose to become Puerto Rico with snow, but I doubt there’s much interest in that,” Mr. Breitenbauch said, referring to the unincorporated United States territory.