Then-White House senior counselor for economic initiatives Dina Powell, followed by Ivanka Trump, leaves a news conference in 2017. (Andrew Harnik/AP/file)

Former White House aide Dina Powell is no longer in the running to succeed Nikki Haley as U.S. ambassador to the United Nations, a senior White House official and a person familiar with the matter said Thursday.

The news removes from consideration a former deputy national security adviser and current Goldman Sachs executive who President Trump had told some advisers was his preferred choice for the job.

Powell withdrew her name Thursday in a “warm” phone conversation with Trump, according to the person familiar with the situation. She will likely remain an unofficial outside adviser, the person said, adding that it was “just the wrong moment” for Powell, who has a young family and a job she loves at Goldman Sachs.

News of Powell taking her name out of consideration was first reported by Reuters.

Powell remains close with the president and his family — daughter Ivanka Trump and son-in-law Jared Kushner — as well as other senior administration officials. She left the White House earlier this year and moved to New York to join her family.

Powell and Trump also spoke Wednesday, and the president conveyed to some confidants that she was one of his top choices for the job. At the time, a senior White House official described Powell as one of two leading candidates.

“She’s certainly being considered. She’s done a great job, she was with us, as you know, for a long time,” Trump told reporters when he landed in Erie, Pa., Wednesday for a campaign rally.

But Powell also faced some opposition, including from Chief of Staff John F. Kelly, with whom she had clashed during her time in the administration and who considered her a sharp-elbowed operator, and some outside conservatives, who dismissed her as a “globalist.”

Powell and national security adviser John Bolton also differed on some policy issues and held differing world views, with Bolton pushing a more hawkish approach to foreign policy.

Trump said earlier this week that he is considering “four or five” contenders to succeed Haley, who did a “great job” in the U.N. ambassador role. Haley is resigning from the position at the end of the year.