Nikki Haley, US Ambassador to the United Nations, speaks in the Oval Office at the White House.

Nikki Haley's abrupt and unexpected resignation from President Donald Trump's administration secured her membership in a singular club - the rare former White House official who leaves Trump's orbit as a political force who could pose a potential threat to the president.

In a sign of her rising profile, the ambassador to the United Nations on Tuesday simultaneously announced her resignation at the end of this year while also reassuring Trump that she has no plans to challenge his reelection.

"No, I'm not running for 2020," she said, seated next to the president in the Oval Office. "I can promise you what I'll be doing is campaigning for this one. So, I look forward to supporting the president in the next election."

The blunt statement underscores both the loyalty demanded by Trump and the political complications Haley could pose to the president.

At 46, Haley has built her own political brand and has a long potential career ahead of her. The former South Carolina governor mixes homespun Southern charm with hard-boiled political savvy - a daughter of immigrants boasting both executive experience in her home state and foreign policy chops from two years as one of Trump's top diplomats.

US President Donald Trump and UN Ambassador Nikki Haley, during a panel discussion at the UN General Assembly meeting in New York on September 18, 2017.

"She's a rising star and he's king, so there's always an inherent tension there," said Mike Murphy, a longtime Republican strategist and Trump critic. "Politically, any star in the party is a threat to Trump because in his Stalinesque way, there's only one sun god and it has to be Trump."

For now, at least, Christine Matthews, a pollster who has worked with Republican candidates, said that Haley seems to be leaving the Trump administration on her own terms and with her personal and political bona fides still intact.

"She has served very well and has only enhanced her reputation and I think she's probably the only person in the Trump administration who you can say that about," Matthews said.

She likened Haley to Condoleezza Rice - the secretary of state and national security adviser under President George W. Bush - who was often mentioned as a possible GOP vice-presidential candidate. "She's one of these rare people in Republican circles who conservatives and moderates really like and women and men can both agree on," Matthews said. "She is somebody who is outside of stereotypical Republican central casting. She's Indian American, she's young, she's both pragmatic as well as conservative, and I feel that she very much has that image going for her."

Yet for a rising star, it remains unclear where she will shine. In the hours after her surprise announcement, political operatives floated options ranging from a high-dollar private-sector gig to a television contributor deal and book contract. There was also chatter that Haley could seek the Senate seat occupied by Lindsey Graham, R-S.C. - an idea quickly dismissed by Haley confidants, Trump and Graham himself. "I have zero desire to be a Cabinet member," Graham quipped.

Rick Tyler, a Republican strategist and former adviser to Sen. Ted Cruz, R-Texas, said that while Haley's departure was highly choreographed - "Who gets to resign in the Oval Office? It's unbelievable" - the challenge for Haley will be how she bides her time, especially if Trump seeks reelection in 2020 as expected.

"If she runs in 2024, she'll have to figure out how to keep her profile active for the next six years, and most politicians can't manage that," Tyler said.

The timing of Haley's exit, less than a month before the 2018 midterms, struck many in the president's circle as either savvy or suspect.

On the one hand, she leaves with foreign policy credentials, the credibility that comes from navigating an often chaotic White House and ahead of potential political fallout from the November elections or Special Counsel Robert Mueller's Russia investigation.

"She's shrewd, which is good in politics, but you have to keep an eye open," said H. Boyd Brown, a former Democratic South Carolina legislator who has battled with Haley in the past. "She's coming for you if you are in her way."

The suddenness and secrecy surrounding her announcement Tuesday also prompted speculation about her motives. The expansive portfolio she enjoyed during Rex Tillerson's tenure as secretary of state was diminished by the arrival of Secretary of State Mike Pompeo and national security adviser John Bolton, who controlled foreign policy out of the White House and made themselves more visible than their predecessors.

Trump has also been leery of her ambitions at times, frustrated when she made announcements on television or when she garnered large amounts of glowing press coverage. Haley had been privately skeptical of some of the president's politics and tactics, yet was careful even in private situations not to criticize him while marveling at his crowds and poll numbers.

"Resignations in national politics are highly calculated maneuvers - it's not just like, 'Uh, I think I'll have chili for lunch,' " Murphy said. "This was so abrupt and the timing so politically weird that it sure reads like it's preempting something . . . If it's the political masterstroke, where's the landing pad? Where's the ooh and ahh?"

A polished campaigner, Haley already was a rising national star in the Republican Party when Trump began running for president in 2016. She did not hide her discomfort with his pugnacity and the racially insensitive aspects of his campaign, delivering criticisms of Trump's rhetoric and demeanor, and ultimately endorsing a competitor, Sen. Marco Rubio, R-Fla.

But Trump won the primary in Haley's home state handily, so his move to make her U.N. ambassador was seen as an olive branch to the Republican establishment.

Haley - one of the few women in the Cabinet and one of the few minorities to hold a senior administration position - quickly became the face of Trump's foreign policy, demonstrating political acumen and shrewdness in her dealings with the White House.

When speculation mounted last month that Haley might have authored an anonymous New York Times column claiming a "resistance" within the Trump administration, Haley penned a Washington Post column under the headline: "When I challenge the president, I do it directly. My anonymous colleague should have, too."

In April, Haley revealed in a television interview that the administration would be rolling out new economic sanctions against Russia. Trump was upset because he was not ready to impose the new penalties, and National Economic Council Director Larry Kudlow said Haley had bungled the interview out of "confusion."

The U.N. ambassador shot back the next day: "With all due respect," she said, "I don't get confused."

Haley's positioning on racial issues also stood in contrast with that of Trump. In August 2017, after Trump suggested both sides were to blame for the deadly white supremacist rally in Charlottesville, Virginia, Haley made clear she disapproved of the president's response but stopped short of publicly breaking with him, saying that she had communicated her views to him in private.

Notoriously fearful of media leaks, Haley has long micromanaged her own image and career and has kept extraordinarily close counsel, discussing major career moves only with her family and a clutch of key advisers. During her 2010 gubernatorial campaign, she kept her own schedule, pecked out emails late into the night and personally monitored comments on her Facebook page.

Once based in New York City for her U.N. post, Haley sought to stand apart from the backbiting that has often defined the West Wing, balancing a desire to be seen as independent with not running afoul of Trump.

Katon Dawson, former chairman of the South Carolina Republican Party, said Haley's whirlwind resignation was probably deliberate.

"She's certainly not confused," Dawson said. "What you saw was vintage Nikki Haley."

---

The Washington Post's Josh Dawsey and Anne Gearan contributed to this report.