U.N. Ambassador Nikki Haley surprised virtually everybody this week when she announced she'd be resigning from her post at the end of the year.
In doing so, Haley has managed something unique.
She leaves the Trump administration with her reputation not merely undiminished but actually enhanced. She's popular with both pro- and anti- Trump factions on the right, and with shockingly high numbers of Independents and Democrats.
She has a long list of accomplishments under her belt and no embarrassments or scandals.
She is almost certainly the most popular politician in America.
Okay, full disclosure: I'm biased and conflicted. I'm biased because I am a fan of Haley. I'm also conflicted because my wife, Jessica Gavora, works for Haley as her speechwriter and adviser.
While I'm at it, let me also say that one of my wife's more admirable (and annoying) traits is that she never tells me the cool stuff. For all I know, she's got the 411 on what's going on at Area 51. So if there's some secret scandal or devious plan behind Haley's resignation, I don't know what it is and neither does Jessica — unless she's lying to me.
Whatever Haley's thinking is, one thing is obvious: She has better political timing than anyone else currently in the business. She's not leaving until January, but by announcing it now, she can't be seen as deserting ship if the midterms go badly.
There's the old saying: "It's better to be lucky than good." Haley is both.
An outspoken Trump critic in the primaries, she was nonetheless Trump's choice for U.N. ambassador. There are many theories for why Trump wanted her for the job. Some argue this was the only way to get Haley out of the South Carolina governor's mansion to make room for her then-lieutenant governor, Henry McMaster, a far more full-throated Trumpist.
Also, Trump likes hiring prominent critics in order to make them acknowledge his victory over them. Others say he wanted to unite the party. Recall his overture to sharp Trump critic Ohio Gov. John Kasich to be his running mate. Trump ultimately picked Indiana Gov. Mike Pence, who'd technically endorsed Sen. Ted Cruz, R-Texas, in the 2016 primaries, even if he spent most of his time man-crushing on Trump.
Meanwhile, the timing was fortuitous for Haley to leave before the end of her second term as governor. She had recently handled both a particularly horrific church shooting and the subsequent wrenching debate about the Confederate flag flying at the state capitol nearly perfectly.
Even so, it was a big risk for Haley to take the U.N. job. She had little foreign policy experience to speak of, and the risk that she might be forced to either defend the indefensible or resign in protest was high. Only in retrospect does it seem obvious this was the best job in the Trump administration and that she was the best person for it.
First, the U.N. is the best arena in the world for picking the right enemies. Also, the U.N. ambassador is outside the snake pits of Washington while still at the center of the media world. Haley was also blessed to have a political nonentity, Rex Tillerson, working as secretary of state.
Because it's a foreign policy post, Haley didn't have to weigh in on every Trumpian controversy. But when she did — on the "#Me Too" movement, Russian meddling, etc. — she did it in a way that differentiated herself from Trump and his sycophants without seeming disloyal or mealy-mouthed.
Haley made it all look easy, in part because she's a good politician — a daughter of Indian immigrants in a state renowned for ugly politics who managed to win two governor's races.
But she's also willing to do something too few politicians with charm and luck on their side bother to do: her homework. After all, she started out as the family bookkeeper at 13.
The timing and manner of her decision was near perfect. Once again, she's not only leaving on a high note, she's leaving as the only prominent Republican around today who can simultaneously unite the party and also appeal to non-Republicans. (Which is why you can expect the knives to come out soon.)
If Trump runs in 2020, it's doubtful anyone could take the nomination from him. If he doesn't run, the Republicans could be in desperate need of a minority woman who's acceptable to a divided GOP and to voters repulsed by Trump.
It's all about timing, and at 46, Haley's got all the time she needs.
Jonah Goldberg is a syndicated columnist and author. He explores politics and culture for National Review as a senior editor. He is the author of "Liberal Fascism" and "The Tyranny of Cliches: How Liberals Cheat in the War of Ideas.” For more of his reports, Go Here Now.