ODENSE, Denmark — “I’m not going to enter a war of words with anybody, including the American president,” Denmark’s prime minister, Mette Frederiksen, told a Danish television channel on Wednesday.
In Denmark, a small country with powerful neighbors, commitment to international alliances is bedrock policy, and polite, measured political debate is the norm. Ms. Frederiksen usually reflects that orthodoxy, but she has occasionally demonstrated a sharp tongue — by Danish standards — and skepticism about the United States; she made a splash early in her career by comparing American policy on women’s reproductive rights to Saudi Arabia’s.
So her tart dismissal this week of President Trump’s interest in buying Greenland as “an absurd discussion” was not surprising to Danes, and neither was her pivot to conciliatory words.
“Thankfully, the time when you buy and sell other countries and populations is over. Let’s leave it there,” she told a television reporter on Sunday. “Jokes aside, we would naturally love to have an even closer strategic relationship with the U.S.”
Ms. Frederiksen seemed prepared to let the matter pass as a momentary blip in the relationship with Washington, but Mr. Trump was not. He called her response “nasty” and called off a visit to Denmark that was scheduled for next month.
Many Danes were outraged by Mr. Trump’s cancellation and Twitter posts, calling them insulting and worse, but if Ms. Frederiksen shared their anger, she did not let on, expressing only “regret and surprise.”
Danes are usually conflict-averse, but a spat with Mr. Trump is unlikely to do Ms. Frederiksen any political harm. Policy differences aside — and there are many — people in Denmark tend to dislike self-aggrandizement and ostentatious displays of wealth, hallmarks of Mr. Trump’s.
But in a country where business executives bicycle to work, physical hardiness is prized and leaders must take care not to seem too full of themselves, the prime minister fits the mold.
On social media, she posts unglamorous pictures of herself kayaking, mowing the lawn or dressed for a run, and she does not shy away from less-than-flattering images — photos of her combing a bull or midway through having her hair styled. When Ms. Frederiksen, a divorced mother of two, became prime minister, she wrote on Facebook that she was reading volumes to prepare, “and I cleaned the fridge and cut the hedge.”
But behind that apparent ordinariness lurks an intense drive. Years before she was old enough to vote, she campaigned to preserve rain forests, protect whales and end apartheid.
She grew up in Aalborg, an industrial city in northern Denmark, in a family that was active in the long-dominant center-left party, the Social Democrats. People who knew her in her early years of involvement in the party described her as “impassioned” and an idealist, according to a profile in Altinget.dk, a political news site.
She went to work for a labor union alliance, then won election to Parliament at age 24, and quickly emerged as a leader of the party’s left wing. She became party leader in 2015, and in June this year led the Social Democrats to an electoral victory that made her, at 41, the youngest prime minister in the country’s history.
“In her youth she created edge, or put less popularly, she created division,” said Noa Redington, an adviser to a former Social Democrat prime minister, Helle Thorning-Schmidt.
As she swiftly rose to positions of ever-greater prominence, Ms. Frederiksen moderated her image, becoming seen as more centrist and less of a firebrand. One of her primary goals early on, to prosecute people who hire prostitutes, has rarely come up in recent years.
She and her party advocate hard-line policies on immigration and migrants already in Denmark — stances that once would have been startling for the Social Democrats, and often align them with parties on the right.
Although the number of asylum seekers arriving in Denmark has fallen in recent years, voters have repeatedly endorsed a hard line on immigration, and Ms. Frederiksen has pushed her party in that direction.
While she may find common ground with Mr. Trump on that topic, Ms. Frederiksen is at odds with him on global warming, an issue that tops her agenda. She has promised a 70 percent reduction of carbon emissions in order to meet the targets of the Paris climate accord, though her government concedes that it does not know how it will meet that goal.
At the very least, Ms. Frederiksen’s minority government will have to work with a shifting coalition of parties in Parliament. While the right-wing Danish People’s Party could be an ally on immigration, some of its leaders have dismissed concerns about climate change as hysteria.
But there is little disagreement in Denmark among mainstream political parties about the country’s relationship with the United States. Danish leaders and citizens largely see the United States as an important ally, and Danes have joined Americans in missions in Iraq, Syria and Afghanistan, where it lost 43 troops.
Mr. Trump criticized Denmark’s military spending on Wednesday, writing on Twitter that as “a wealthy country” it should spend more, a criticism he frequently makes of NATO member countries.
But Ms. Frederiksen has sought to quell the uproar over Mr. Trump’s interest in buying Greenland, a semiautonomous part of Denmark. She stressed the good ties between the countries, and the increasing importance of the Arctic, where melting sea ice has increased competition for oil and minerals.
After Mr. Trump aborted his plan to visit, Ms. Frederiksen had a muted reaction, saying that “our invitation for stronger cooperation on Arctic affairs still stands.”
She added: “This does not change the character of our good relations.”