US President Donald Trump has accepted Nikki Haley's resignation as US ambassador to the United Nations, saying she would be leaving his administration at the end of the year.
In the White House's Oval Office on Tuesday, Trump called the ambassador a "very special" person "who gets it", adding that she told him six months ago that she might want to take some time off.
Trump said that together they "solved a lot of problems".
Haley, 46, said she had no immediate plans, and denied she would be running for president in 2020.
Trump said on Tuesday that she could have her "pick" of posts if she ever decided to come back to the administration.
"We're all happy for you in one way, but we hate to lose - hopefully you'll be coming back at some point but in a different capacity. You can have your pick," the president said.
Trump added he was considering many candidates for Haley's job and that a successor would be named in two to three weeks.
'I don't agree with the president on everything'
Haley was appointed to the UN post in November 2016.
Before she was named by Trump to her UN post, Haley was governor of South Carolina, the first woman to hold the post. She was re-elected in 2014.
A rookie to international politics, Haley was an unusual pick for UN envoy.
The daughter of Indian immigrants, Haley clashed with then-candidate Trump during the 2016 campaign, denouncing "the siren call of the angriest voices" who disrespected America's immigrants. Trump tweeted that "The people of South Carolina are embarrassed by Nikki Haley."
Last month Haley wrote an op-ed article in The Washington Post discussing her policy disagreements but also her pride in working for Trump. It came in response to an anonymous essay in The New York Times by a senior administration official that alleged there to be a secret "resistance" effort from the right in Trump's administration and that there were internal discussions of invoking the 25th Amendment to remove him from office.
"I proudly serve in this administration, and I enthusiastically support most of its decisions and the direction it is taking the country," Haley wrote. "But I don't agree with the president on everything."
Haley is the latest in a long line of high-profile departures from the administration, such as former Secretary of State Rex Tillerson, who was fired in March, and Steve Bannon, Trump’s chief strategist, who left in August 2017.
Her resignation was also a closely guarded secret. Congressional Republicans involved in foreign policy matters and some key US allies did not get advance word from Haley or the White House.
Outspoken on key issues During her time as the UN ambassador, Haley was often outspoken on several issues in which the US seemed to be at odds with many other countries.
Just after taking her post in 2017, Haley said the Trump administration was going to push for an overhaul of the world body and bluntly warned those who opposed Washington's policies that she is "taking names".
"Our goal with the administration is to show value at the UN and the way that we'll show value is to show our strength, show our voice, have the backs of our allies and make sure that our allies have our back as well," Haley said at the time. "For those that don't have our back, we're taking names, we will make points to respond to that accordingly."
She issued a similar warning during a General Assembly vote in December 2017 on a resolution against Trump's decision to recognise Jerusalem as the capital of Israel and move the US embassy to the city.
In the letter, obtained by Haaretz at the time, Haley wrote that Trump "will be watching [the] vote carefully" and "requested I report back on those who voted against us."
Recently, Haley suggested the right of return for Palestinian refugees could be removed from any eventual peace settlement with Israel. She also accused the United Nations Relief and Work Agency (UNRWA) of exaggerating the number of Palestinian refugees it currently provides aid to and services for. Last month, the US said it was stopping its funding for UNRWA.