U.S. Secret Service Director Randolph ‘Tex’ Alles is stepping down from his post, officials said Monday, in the latest shake-up at the Department of Homeland Security following outgoing Secretary Kirstjen Nielsen’s resignation.

Sources told Fox News on Monday that Alles was notified 10 days ago to "prepare an exit plan," in a signal that a transition in leadership at the Department of Homeland Security was imminent. Alles was told that he should be prepared to leave his post as head of the Secret Service as part of that transition.

“United States Secret Service director Randolph 'Tex' Alles has done a great job at the agency over the last two years, and the President is thankful for his over 40 years of service to the country," White House Press Secretary Sarah Sanders said in a brief statement Monday.

KIRSTJEN NIELSEN MAKES FIRST PUBLIC COMMENTS AFTER RESIGNATION AS DHS BOSS

She said that Trump has picked career Secret Service member James M. Murray to take over the agency in May. Alles will remain in his role until then.

A law enforcement official told Fox News that, inside the agency, the news of Alles' departure came as a surprise.

Alles’ departure comes on the heels of Nielsen’s resignation and, according to a source, has nothing to do with the recent Mar-a-Lago incident, in which a woman was arrested at the president’s Florida property after allegedly carrying two Chinese passports and malware.

KEVIN MCALEENAN, NEW ACTING DHS BOSS, HAS LONG RECORD IN BORDER SECURITY

Nielsen and President Trump met at the White House on Sunday -- after which the president announced that Nielsen would leave her post as head of DHS. Trump also announced that Customs and Border Protection (CBP) Commissioner Kevin McAleenan would be appointed as acting DHS secretary.

Later, Nielsen tweeted that she had submitted her resignation.

“Its[sic] been an honor of a lifetime to serve with the brave men and women of @DHSgov. I could not be prouder of and more humbled by their service, dedication, and commitment to keep our country safe from all threats and hazards,” she tweeted with an image of the resignation letter.

The letter, addressed to the president, said: “Despite our progress in reforming homeland security for a new age, I have determined that it is the right time for me to step aside.”

Nielsen’s resignation came amid an influx of migrants at the U.S.-Mexico border. The Associated Press reported that Nielsen had been frustrated with the difficulty of getting other departments to help to deal with the growing number of families crossing the border.

But administration officials told Fox News on Sunday that Nielsen’s background in cybersecurity made her a poor fit to handle border issues, while McAleenan best fits Trump’s requirement of being the “toughest cop” on the frontier. Sources told Fox News that Nielsen had been viewed as resistant to some of the immigration measures pushed by the president and his aides, specifically related to protected status for some refugees and policies at the border.

A senior administration official told Fox News that National Security Adviser John Bolton long felt that Nielsen was not the right person for the job

Nielsen served as the head of DHS for 16 months, following the appointment of former DHS Secretary John Kelly to be White House chief of staff. Kelly has since resigned from the administration.

Nielsen's departure is the latest staffing shakeup in the department, which was founded to combat terrorism after the Sept. 11, 2001 terror attacks.

On Friday, Trump confirmed he had withdrawn the nomination of acting Immigration and Customs Enforcement (ICE) Director Ron Vitiello to become the permanent head of the agency, telling reporters that "Ron’s a good man, but we’re going in a tougher direction, we want to go in a tougher direction." Administration sources tell Fox News that the withdrawal of Vitiello's nomination was the first step in Trump's plan to control the border crisis.

The second step was asking for Nielsen's resignation.

Fox News' Samuel Chamberlain and The Associated Press contributed to this report.