President Donald Trump is reportedly removing the Secret Service director.

This marks a second departure of a top official at the Department of Homeland Security (DHS) in fewer than 24 hours.

Trump announced on Sunday night that Homeland Security Secretary Kirstjen Nielsen would be resigning. He added that she would be replaced by the US Customs and Border Protection chief.

President Donald Trump is removing Randolph "Tex" Alles as the Secret Service director, marking the second departure of a top official at the Department of Homeland Security (DHS) in fewer than 24 hours, according to CNN.

CNN reported Alles is being removed from his post on Monday. His exit follows the resignation of Homeland Security Secretary Kirstjen Nielsen on Sunday evening.

Read more: Before Nielsen's abrupt resignation, hardline Trump adviser Stephen Miller was reportedly handed total control of border policy

According to CNN, a senior administration official described the ousting of Alles and Nielsen as a "near-systematic purge happening at the nation's second-largest national security agency."

Later on Monday, White House Press Secretary Sarah Huckabee Sanders said in a statement that "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."

"Mr. Alles will be leaving shortly and President Trump has selected James M. Murray, a career member of the USSS, to take over as director beginning in May," she added.

The Secret Service is a part of DHS, which has now lost two key officials since Trump announced on Twitter that Nielsen would be resigning on Sunday evening.

Kevin McAleenan, the commissioner of US Customs and Border Protection, is now slated to serve as acting DHS secretary.

The officials' ousting comes as the White House senior adviser Stephen Miller has been consolidating power on immigration policy, a top priority for DHS. Miller is a border and immigration hardliner inside the White House and helped craft the controversial child-separation policy from last year.

The shifting roles also come as the Trump administration is moving forward with the national-emergency declaration to build a wall along the US-Mexico border using diverted military funds. After attempts to terminate the emergency declaration failed in Congress, Trump is moving full-steam ahead.

But there are still several lawsuits challenging the emergency declaration's reprogramming of appropriated funds, including a recently announced legal challenge from House Democrats.