Top officials at the Department of Homeland Security, including Secretary Kirstjen Nielsen, were caught off guard by the White House’s sudden move Thursday night to pull the nomination of Ronald Vitiello as head of Immigration and Customs Enforcement, according to two sources who spoke with the Washington Examiner.

Nielsen, who has overseen DHS for 16 months, on Thursday was blindsided and called Vitiello after midnight for more information on what had happened, one source close to Vitiello said.

Vitiello got a call from a White House official Thursday night telling him he would not be traveling with President Trump and Nielsen to Southern California the following day because his nomination had just been rescinded.

Both sources, who spoke on background because they were not authorized to speak for the White House or ICE, said Vitiello was told by a second White House official his name was pulled due to a “paperwork” issue.

The second official who spoke with the Washington Examiner said it likely came down to Vitiello not being endorsed by ICE union head Chris Crane.

Vitiello did not go into the office Friday due to the sudden change. He's now running ICE in an acting capacity. It’s not clear where he is headed as the White House mulls over who to instead install at the agency.

The move puts ICE without a leader as the agency deals with the highest number of noncitizens in its custody in over a decade.

[ Related: Trump on withdrawal of ICE nomination: ‘We’re going in a tougher direction’]