Nikki Haley abruptly resigned Tuesday as the US ambassador to the United Nations, in the latest departure from President Donald Trump's often shifting national security team.
Meeting Haley in the Oval Office, Trump said she had done a "fantastic job" and would stay on to the end of the year.
"She told me probably six months ago," Trump told reporters, that '"I want to take a little time off.'"
A successor will be named "in the next two or three weeks," he said.
However, Haley was coy on her reasons for quitting, saying only that it was "important to understand when it's time to stand aside" after a string of challenging jobs.
And US media reports quoted administration officials saying privately that Haley's departure was a surprise even to Secretary of State Mike Pompeo.
Responding to media speculation, Haley insisted that she was not planning to run for president against Trump in 2020, when she might be seen as a more moderate Republican alternative.
"No I'm not running," she said emphatically.
Trump and Haley went out of their way at the Oval Office meeting to emphasize that the resignation was taking place on amicable terms -- something far from always the case in the turbulent first two years of the administration.
Her exit comes a day after an anti-corruption group called for a probe into her acceptance of flights on airplanes owned by businessmen last year, although there was no indication of a link to the resignation.
Trump's UN hawk
A former governor of South Carolina, Haley took the UN job with little experience in foreign policy, but quickly became the full-throated voice for the often unpopular Trump agenda.
Haley has pressed for a hard line on Iran, justified US cuts to foreign assistance and earlier this year led the United States in bolting from the UN Human Rights Council, accusing it of bias against Washington and close ally Israel.
At the recent UN General Assembly session, Haley took the highly unusual step for a senior diplomat of joining street protesters against Venezuelan President Nicolas Maduro, shouting from a megaphone that the leftist leader should leave office.
However, there was embarrassment at the international diplomatic get-together when the audience in the hall burst into laughter during Trump's keynote speech, where he claimed that his government had achieved more in two years than "almost any other administration in the history of our country."
The daughter of Indian immigrants, Haley had long been seen as a rising star in the Republican Party which has eagerly sought female and ethnic minorities to broaden the appeal beyond its traditional white demographic.
Haley, whose given name was Nimrata Randhawa, was elected governor in 2010 of deeply Republican South Carolina and, during the 2016 campaign, had criticized Trump over his remarks on immigrants before their political reconciliation.
Haley's is the latest resignation in a turbulent White House, where Trump is already on his third national security adviser and second secretary of state before even the midterm elections.
She insisted that she was going out on a high and would remain loyal to Trump.
"Countries may not like what we do but they respect what we do," she said, echoing the president's often-stated aim to make the US a more muscular presence on the international stage.
She listed hawkish policies to pressure Iran and the Palestinians, and the ground-breaking diplomatic outreach to North Korea.
"All of those things have made a huge difference in the US standing, but I can tell you that the US is strong again. The US is strong in a way it should make all Americans proud," Haley said.
Despite the many positive reviews for Haley in Washington, the group Citizens for Responsibility and Ethics in Washington on Monday urged an investigation into her use of private planes and accepting of basketball tickets as gifts.
The group urged the State Department's inspector general to probe seven flights that Haley and her husband took last year on aircraft belonging to businessmen from South Carolina.
Haley, on a filing required of government employees, disclosed the flights from New York to South Carolina and Washington and estimated the highest value at $1,066, based on the cost of commercial first-class tickets.
But the pressure group said that the value was more likely in the tens of thousands of dollars.