“As a junior foreign service officer, I signed an oath to serve faithfully the president and his administration in an apolitical fashion, even when I might not agree with certain policies,” Feeley said in his resignation letter, Reuters reported.

“My instructors made clear that if I believed I could not do that, I would be honor bound to resign. That time has come,” he added.

The State Department confirmed the departure, saying Feeley has decided to “retire for personal reasons, as of 9 March this year.”

Panama’s DiaaDia reported his resignation before The Washington Post broke the news about Trump’s offensive remarks in an Oval Office meeting with senators about immigration.

Feeley was nominated to the diplomatic post by then-President Obama in July 2015.

The Marine Corps veteran flew amphibious assault helicopters in and over Lebanon in the mid-1980s following the 1983 bombing of the Marine Barracks in Beirut.