President-elect Donald J. Trump’s attention returned Tuesday to an idea that has fascinated him for years: acquiring Greenland for the United States. In a news conference on Tuesday, he refused to rule out using military or economic force to take the territory from Denmark, a U.S. ally.

“We need Greenland for national security purposes,” he said, arguing that Denmark should give it up to “protect the free world.” He threatened to impose tariffs on Denmark if it did not.

Earlier in the day, Mr. Trump wrote on social media that the potential American acquisition of the Arctic territory “is a deal that must happen” and uploaded photos of his eldest son, Donald Trump Jr., who was visiting Greenland.

“MAKE GREENLAND GREAT AGAIN,” the president-elect added.

After the news conference, Denmark sharply rebuked the proposal, saying that the world’s largest island is not for sale.

During his first term, Mr. Trump urged his aides to explore ways to purchase Greenland, a semiautonomous territory known for its natural resources and strategical location for new shipping routes that can open up as the Arctic ice melts. A few weeks ago, Mr. Trump reignited the conversation through social media, asserting that “the ownership and control of Greenland is an absolute necessity.”

Greenland’s vast ice sheets and glaciers are quickly retreating as the Earth warms through accelerating climate change. That melting of ice could allow drilling for oil and mining for minerals such as copper, lithium, nickel and cobalt. Those mineral resources are essential to rapidly growing industries that make wind turbines, transmission lines, batteries and electric vehicles.