Unlike some top White House officials who were fired or resigned amid controversy earlier this year, Powell is exiting on good terms with the president, the officials said. She and Trump have discussed her departure and are working on an arrangement for Powell to continue advising the administration on Middle East policy from outside the government, according to the officials, who spoke on the condition of anonymity because Powell’s departure has not yet been publicly announced.

Powell committed to serving in her national security job for a full year and her decision to leave is her own, the officials said. She plans to move home early next year to New York, where her family lives.

National security adviser H.R. McMaster called Powell “one of the most talented and effective leaders with whom I have ever served.”