Transcript for UN ambassador Nikki Haley resigns unexpectedly

That unexpected departure in the trump administration. U.N. Ambassador Nikki Haley resigning. Why announce she's leaving just weeks before the midterms? And what she said today about the election in 2020. Also late today, how the president answered when he was asked if his daughter ivanka is a potential replacement. And Ivanka Trump tonight now weighing in, too. Here's ABC's senior white house correspondent Cecilia Vega tonight. Reporter: She's a one-time critic of the president's, who went on to become one of the few women in his cabinet. A hawk who championed America first. For those that don't have our back, we're taking names. Reporter: But today, just four weeks before the midterms, Nikki Haley announced her surprise resignation. President trump called the cameras into the oval office and made a show of it. I thought this would be an appropriate way of doing it. Because, when you write it out on a piece of paper that ambassador Haley will be leaving and you say nice things, people say, well, what's going on? Reporter: The announcement reportedly caught even some top administration officials off guard. Though the president says Haley actually broke the news to him six months ago. From Haley herself, no concrete explanation on why she's leaving. No, there's no personal reasons. I think that it's just very important for government officials to understand when it's time to step aside. Reporter: And even before reporters could ask, she made a point of safing this -- For all of you that are going to ask about 2020, no, I'm not running for 2020. I can promise you what I'll be doing is campaigning for this one. Reporter: Her goodbye, singling out two people who were both right there in the room. I can't say enough good things about Jared and ivanka. Jared is such a hidden genius that no one understands. And ivanka has been just a great friend. Reporter: And tonight, in the Washington buzz among the names being floated as a possible Haley replacement, Ivanka Trump. How good would ivanka be? The people that know, know that ivanka would be dynamite. But you know, I would then be accused of nepotism, if you can believe it, right? Yes. Reporter: Is it a serious consideration though? Would she be a good fit for that job? I think ivanka would be incredible. It doesn't mean I would pick her. Because you would be accused of nepotism. Even though I'm not sure there is anybody more competent in the world. But that's okay. So, let's get to Cecilia Vega live from the white house. And Cecilia, Ivanka Trump appearing to take herself out of the running just before we came on the air tonight. Reporter: On Twitter, he says the president will nominate a formidable replacement, but that, quote, the replacement will not be me. The president just told reporters, David, he's got a list of five names he's considering. All right, Cecilia Vega live at the white house tonight. Cecilia, thank you. The supreme court's newest

This transcript has been automatically generated and may not be 100% accurate.