Nikki Haley is leaving President Donald Trump's cabinet at the height of her career as the US Permanent Representative to the UN has put a firm mark on the office.
A strong personality known for independence and strength to stand up to Trump, she left on her own terms and the president put on a spectacle of respect and friendship while they jointly announced her resignation on Tuesday -- a marked contrast to some of the other departures from the administration like that of Secretary of State Rex Tillerson, who was fired while abroad, and National Security Adviser H.R. McMaster.
Before the media at the White House, Trump praised her for "a fantastic job" in a "very dangerous" world and said: "Hopefully, you'll be coming back at some point ... in maybe a different capacity. You can have your pick."
She was not a Trumpist, having supported his rival Marco Rubio in the Republican Party primaries. But a party loyalist, she backed Trump once he got the nomination.
Her independent streak shone through when she said that women accusing Trump should be heard and in her strong stand on Russia that is unlike the president's.
Not one to be bullied, she publicly chastised White House economic adviser Larry Kudlow who had said she may have had "momentary confusion" on Russia sanctions.
She wrote in a Washington Post op-ed, "I don't agree with the president on everything. When there is a disagreement ... I pick up the phone and call him or meet with him in person."
The child of Sikh immigrants from Amritsar in India, she has recalled that as a five-year-old she was rejected by the Miss Bamberg contest in her native town in the deep south because she did not fit into the category of Black or White.
That and other experiences like that inoculated her against adversities and toughened her spirit of independence that led her to become the first woman and first non-white to become the governor of South Carolina.
She brought the political skills honed in the hardscrabble arena of South Carolina to the UN, where she cajoled and coerced nations to back the US policies, such as that on tightening sanctions on North Korea, but was not afraid to stand alone, deserted by allies, when she faced opposition to the US moving its embassy in Israel to Jerusalem.
She roared into the UN threatening to "name names" while identifying foes and friends.
Her harsh rhetoric could match Trump's: She said after a Syrian gas attack that Russia's hands "are all covered in the blood of Syrian children" and called Venezuela "a criminal narco-state" born of its "perverse vision of a socialist paradise".
Among her achievements were paving the way for Trump's emerging detente with North Korea's Kim Jong-un by getting Russia and China to enforce the UN sanctions, and getting the UN to tighten its budget by $1.3 billion (with more than 75 per cent of the savings going to other countries).
She could not make any headway in Syria, although she may have deterred harsher action by Damascus and Moscow against rebel-held territories with her warning of "dire consequences".
Haley mixed her tough talk at the UN with showing diplomats America's "Southern hospitality" of which she was proud.
UN Secretary-General Antonio Guterres expressed his "deep appreciation" for her cooperation with the world body.
Question marks hang over her surprise resignation and her future.
At her news conference with Trump, she said "I don't have anything set", but declared she wasn't going to run for president in 2020 and would campaign for him.
There was only a vague indication from her about why she was quitting now.
After "eight years of intense time" as governor and as UN ambassador Haley said: "I think you have to be selfless enough to know when you step aside and allow someone else to do the job."
While the reticent Tillerson was the Secretary of State and a serving lieutenant general, H.R. McMaster was the National Security Adviser, she had a high profile and, at times, even appeared to be holding the foreign policy establishment together with her public image.
But Pompeo and National Security Adviser John Bolton both have a strong public persona and her image dimmed. She also had to deal with their often clashing foreign policy agendas.
As for her future, she has nearly three months to chart her short-term plans.
For the long-term, she is very popular among the Republican rank-and-file -- countering the stereotype of racism thrust on them; after all, it was they who elected her governor.
She has now added international experience to her domestic portfolio of actually running a state.
Leaving the Trump administration with her head held high and without antagonising him or his base gives her a strong measure of political viability with an appeal to the more moderate Republicans.
With the Republican base, she may even benefit from the virulent opposition that she evokes from many of the liberals and Democrats.
For them a non-white -- and a woman at that -- could have no independent ideology and should only bow to the Democratic Party; she not only mocked the idea but went on to a stellar Republican career.
Some Indians also joined in and put her on the "Desi Wall of Shame" -- and trolled her with it. (They also falsely said on their website that she was among "caste-privileged Hindus.")
(With inputs from agencies.)