Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

South Carolina Gov. Nikki Haley easily won confirmation to be President Donald Trump's ambassador to the United Nations Tuesday.

The Senate voted overwhelmingly in favor of confirmation, with just four senators — Independent Bernie Sanders of Vermont and Democrats Chris Coons of Delaware and Tom Udall and Martin Heinrich of New Mexico — voting against her. It was a quick confirmation, and a striking reversal in fortune for a woman who loudly criticized Trump during the GOP primary and endorsed one of his rivals, Florida Sen. Marco Rubio.

The two-term governor faced questions from Democrats over her lack of experience with global affairs but won plaudits from senators for her handling of prickly issues like Russia and UN actions toward Israel during her confirmation hearings. She's the first woman to be confirmed to Trump's cabinet, but likely not the last; on Tuesday Elaine Chao's nomination as Transportation Secretary was passed out of committee, as well.

Unlike Trump’s secretary of state pick, former ExxonMobil CEO Rex Tillerson, Haley broke with Trump and repeatedly criticized Russia during her confirmation hearing.

“Russia is trying to show their muscle right now. It’s what they do,” she said. She added: “I don’t think we can trust them. We have to continue to be very strong back, and show them what this new administration is going to be.”

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

In a departure with the president, Haley said Russia’s seizure of Crimea, ongoing military operations in Ukraine and its support of Syrian President Bashar al-Assad were all problematic, but echoed Trump in stating that “we need their help in fighting ISIS.”

She also said she wouldn’t support one of Trump’s major campaign proposals — to create a registry of Muslims in the U.S. and a ban on Muslim immigration and travel — but suggested the administration’s views had changed on the issue.

“This administration and I do not think there should be any registry,” she said.

And Haley said during her hearing she would speak up to Trump in favor of the NATO military alliance and the UN, both of which Trump has criticized and toyed with the idea of abandoning.

“Those are his opinions as they stand now,” she said. “I look forward to communicating to him … the importance of alliances [and] that the U.N. matters.

But on Israel, she was fully in line with Trump, telling the Senate Foreign Relations Committee that she “absolutely” supports his promise to move the U.S. Embassy in Israel from Tel Aviv to Jerusalem, a controversial move as both Israelis and Palestinians claim Jerusalem as their territory.

She also spoke out against the Obama administration’s decision to abstain from a vote on a UN Security Council resolution condemning Israel’s settlements.

“I will never abstain when the United Nations takes any action that comes in direct conflict with the interests and values of the United States,” she said.

After Haley is sworn in and resigns as governor of South Carolina, the state’s Lieutenant Governor, Henry McMaster, will replace her and serve out the final two years of her term.