With Greenland thrust into the spotlight by President Trump’s insistence that the United States will “get” the remote island at the top of the world, its parliamentary election on Tuesday took on unusual importance — not just for the outside world, but for Greenlanders.

Voter turnout was at its highest in 12 years, so much so that polling stations on the sparsely populated island, which is partly controlled by Denmark, were kept open late to accommodate long lines. Nearly 74 percent of eligible voters cast a ballot, according to official figures.

With all votes counted early Wednesday morning, the winner was Demokraatit, a party that has been critical of Mr. Trump’s rhetoric. It has taken a moderate stance on the subject of independence from Denmark, which most Greenland politicians support as a long-term goal.

But in second place was a party, Naleraq, that has pushed hard for independence sooner — which some of its members have said would enable Greenland to associate more freely with other countries, including the United States. One prominent member of Naleraq is very pro-Trump and even attended the American president’s inauguration.

Denmark colonized Greenland more than 300 years ago, and while the island is now considered a semiautonomous territory, Denmark still controls its foreign policy, defense and other aspects of its governance. Demokraatit — which won just under 30 percent of the vote, ahead of Naleraq’s 24.5 percent — has consistently argued that independence must come second to economic and social stability.

Lars Trier Mogensen, a political analyst based in Copenhagen, said Demokraatit’s victory suggested that Greenland would not seek drastic change in its geopolitical relationships, at least for now. “The new Greenlandic government is unlikely to rush into major shifts in U.S. relations anytime soon,” he said.

He said the results were “a sign that Greenlandic voters have pragmatically recognized that the economy must be stronger before taking decisive steps toward independence.”

Greenland has a trove of minerals and is strategically located on increasingly important sea lanes. Mr. Trump, in an address to Congress last week, declared that the United States would take control of it “one way or the other.”

On Sunday, two days before the election, he made a direct pitch to Greenland’s 56,000 people. “We are ready to INVEST BILLIONS OF DOLLARS to create new jobs and MAKE YOU RICH,” he wrote in a social media post.

But Greenlanders have been clear that despite Mr. Trump’s entreaties, they don’t want to be absorbed by the United States, with polls showing that at least 85 percent oppose it. “Greenland is not a house that can be bought,” Demokraatit’s leader, Jens-Frederik Nielsen, said during a televised campaign debate.

Still, Kuno Fencker of Naleraq, who is Greenland’s most pro-Trump politician, got far more votes than he did in the last election, in 2021. Mr. Fencker, an advocate for independence as soon as possible, attended Mr. Trump’s inauguration and took a tour of the West Wing, and his push for stronger ties with the United States drew fierce criticism from his rivals, some of whom labeled him a traitor. In a recent podcast, Mr. Fencker argued that Mr. Trump had been “misunderstood.”

Naleraq’s second-place finish means that pro-independence voices will remain influential, and the party could push for greater engagement with Washington. The party’s showing was a dramatic improvement from 2021; at an election night party on the outskirts of Nuuk, the capital, party members and supporters embraced, danced and cheered.

But Mr. Trier Mogensen predicted that Demokraatit was likely to form a governing coalition with the more moderate Inuit Ataqatigiit party, or I.A., which finished third, with 21.4 percent of the vote. Inuit Ataqatigiit, the dominant party in the outgoing governing coalition, embraced a go-slow approach to breaking off from Denmark.

The election results will shape the 31-seat Parliament, the Inatsisartut. Mr. Nielsen of Demokraatit said in a broadcast appearance early Wednesday that the party was “reaching out to everyone,” adding, “Greenland needs unity.”

Greenland, the world’s biggest island, is home to a mostly Inuit population, which was sidelined during the colonial era. Over time, demands for self-rule led to greater autonomy and a Greenlandic government.

Today, Greenland manages most of its domestic affairs. But full independence would be challenging, given that Denmark’s financial support covers over half of Greenland’s budget and pays for everything from schools and social services to cheap gas.

Greenland’s economy is heavily dependent on fishing, though its tourism industry is quickly growing. Many voters said that local issues were more important to them than geopolitics, and skepticism about Mr. Trump has been widespread, among voters and politicians alike.

In the election campaign’s final televised debate on Monday, five of the six party leaders said they did not trust Mr. Trump. Only Karl Ingemann of the Qulleq party, which is small and has little influence, said he did. (Mr. Ingemann failed to win a seat.)

Erik Jensen, the leader of the Siumut party, was especially critical, warning that “Trump is trying to influence us.” Múte B. Egede of Inuit Ataqatigiit, the outgoing prime minister, called the American president “unpredictable” and accused him of “creating instability.”

The election was not an easy one to run. Greenland is three times the size of Texas, and most of it is covered in ice. Ballots had to be transported by helicopter, boat and snowmobile.