President Trump praised Nikki Haley on Oct. 9, 2018, for making the role of U.N. ambassador “a more glamorous position than it was two years ago.” (Evan Vucci/AP)

The surprise resignation of Nikki Haley as U.N. ambassador on Tuesday deprives President Trump’s “America First” philosophy of its most enthusiastic and articulate advocate.

Less clear is whether Haley’s departure marks any change in Trump’s increasingly combative and unilateralist foreign policy.

There were moments when Haley, who often represented an alternative power center in the administration, seemed out of step with the White House and more in line with the sort of traditional Republican foreign policy that Trump spurned. “She would make speeches that bore little or no relation to Trump’s position,” said Thomas Wright, a senior fellow in the Project on International Order and Strategy at the Brookings Institution.

The differences were most notable in her advocacy on behalf of human rights and in Russia policy, areas where Haley touted a hard line that conflicted with the White House’s nebulous and contradictory policy.

Just weeks into the Trump presidency, Haley delivered a speech at the United Nations in which she vowed to keep the pressure on Moscow for its ­“aggressive actions” in Ukraine, including the annexation of Crimea.

“Crimea is a part of Ukraine,” she said. “And our Crimea-related sanctions will remain in place until Russia returns control of the peninsula.” Although the speech had been cleared by Russia policy experts in the White House, it drew a rebuke from Trump, who was taken by surprise, according to current and former senior U.S. officials.

But Haley’s tenure will be best remembered for her ardent defense of some of Trump’s most controversial policies.

During her time at the United Nations, Haley cheered the U.S. withdrawal from the U.N. Human Rights Council and UNESCO, which limited the Trump administration’s ability to influence two institutions it viewed as hopelessly flawed.

Trump also slashed funding for Palestinian aid while recognizing Jerusalem as Israel’s capital without winning any concessions from Israel — a move formally criticized in a 128-to-9 U.N. vote.

In a break with previous U.S. foreign policy, Haley supported Trump’s decision to slash humanitarian aid to other countries as punishment for their breaking with the United States on key policy goals.

“She was not effective in slowing the tide of retrenchment, and in some cases she was part of the problem,” said Stephen Pomper, a senior official at the International Crisis Group who served as a senior White House official under President Barack Obama. “The whole path of taking names and using assistance as crude leverage to get votes at the U.N. was misguided. It makes the U.S. look like a nakedly unprincipled actor.”

Haley differed from other senior Trump administration officials, and the president she served, in the way she advocated for Trumpism.

National security adviser John Bolton, like Trump, has been a snarling presence on the world stage. “If you cross us, our allies or our partners,” Bolton threatened Iran in September, “if you harm our citizens, if you continue to lie, cheat and deceive, yes, there will indeed be hell to pay.”

A few weeks earlier he had declared the International Criminal Court “dead to us.”

By contrast, Haley adopted hard-line positions but avoided hard-edge rhetoric and worked to develop a collegial rapport with foreign diplomats even as she advanced highly unpopular policies at the global body.

“Clearly there has been a lot of tensions between Haley and other ambassadors over Israel and Iran, but I think most diplomats will worry that a hard-line Trump supporter will replace her,” said Richard Gowan, a senior fellow at United Nations University, a global affairs think tank in New York.

Haley was also popular with U.S. diplomats in New York, who saw her as someone who listened to expert opinion, even if she didn’t always follow it. She fought to protect her budget amid massive cuts in the State Department budget, viewing it as a source of power and influence over administration policy.

Haley brought U.N. ambassadors to the Oval Office at least twice to demonstrate her plum spot in Trump’s inner circle and to help explain to Trump how the United Nations works. Trump seemed briefly disconcerted last month when emissaries from around the world laughed as he boasted about his administration’s achievements in a speech before the U.N. General Assembly.

Back in the Oval Office with Haley on Tuesday, Trump focused more on her ability to get along with others than on her policy achievements. “She knows everybody on a very first-name basis,” he said. “And they like her — except for maybe a couple.”

He praised Haley for making U.N. ambassador “a more glamorous position than it was two years ago.”

“I wonder why, but it is,” he said. Almost as an afterthought, Trump added that it was also a “more important position.”

But the position’s importance has been on the steady wane in recent months as Bolton and Secretary of State Mike Pompeo have consolidated power in Washington and limited access to Trump.

For the moment, it is unclear exactly what kind of person Trump will choose to replace Haley. Trump’s praise for the “glamour” Haley brought to the job suggests that he will want someone with celebrity appeal. Bolton, meanwhile, is likely to push for an ideological fellow traveler who will join him in his career-long crusade to obliterate international law or anything that constrains U.S. sovereignty.

Pompeo, one of the more pragmatic members of the administration, is likely to favor an ally who will defer to his leadership.

“Not everyone is going to have her political skill,” said Brett Schaefer, a fellow at the Heritage Foundation. “She established her relationship with Trump early on when H.R. McMaster was national security adviser and Rex Tillerson was secretary of state. Those circumstances have changed, and Ambassador Bolton has very strong views on the U.N.”

The fear in New York and among the more internationally minded members of the Washington foreign policy establishment is that a Bolton-style hard-liner could make strained relations at the United Nations even worse.

“Now, if Bolton wants this to go off the rails, there may be no one stopping that,” said Sheba Crocker, vice president for humanitarian programs and policy at Care USA, who served as the State Department’s assistant secretary for international organization affairs under Obama. “There’s now more risk that will happen.”

In his brief remarks, Trump — perhaps still smarting from the laughter he endured at the United Nations — made clear that he craved respect from the international body and praised Haley as someone who had won allies.

“People want to be on our side,” he said. “Even if you look at the votes in the United Nations, votes that we would normally get no votes, we’re getting very strong votes now.”

He seemed to be referring to Haley’s efforts to block or soften measures critical of Israel, such as a June resolution rebuking the Jewish state for using “excessive, disproportionate and indiscriminate force” against Palestinians in the Gaza Strip. Haley failed to stop the resolution, which was adopted in a 120-to-8 landslide, but she helped encourage 45 abstentions, which some Trump allies framed as a victory.

Haley chose to focus on other wins from her time at the United Nations, such as tough sanctions on North Korea, the administration’s stance toward Iran and an arms embargo she pushed through to curb the fighting in South Sudan.

The embargo represented one of Haley’s signal achievements as something of an independent broker within the administration. The issue didn’t “resonate much in Washington,” Gowan said. But “other diplomats admire her for this.”

It was the kind of achievement, a multilateral approach to a tough diplomatic problem, that may no longer have a champion inside the Trump administration.