President Trump's high-level overhaul of the Department of Homeland Security continued on Tuesday, with the announcement that DHS' acting deputy secretary is resigning amid a reported historic surge in illegal immigrants and asylum seekers at the border.

Claire Grady was technically the next in line to replace Kirstjen Nielsen, who resigned Sunday. But Trump chose Kevin McAleenan, the head of Customs and Border Protection, as acting secretary.

That meant Grady had to resign or be fired. Two officials with direct knowledge of the decision, speaking anonymously to The Associated Press, said Grady was pressed to quit.

Claire Grady official DHS portrait.

Claire Grady official DHS portrait.

In a series of tweets on Tuesday, Nielsen said Grady had offered her resignation, writing that "her sound leadership and effective oversight have impacted every DHS office and employee and made us stronger as a Department."

Nielsen added: "I am thankful for Claire’s expertise, dedication & friendship & am filled w gratitude for her exemplary service to DHS & to our country. I wish her all the best in her future endeavors."

INCREASING NUMBER OF FAMILY UNITS ARE TRYING TO ILLEGALLY ENTER U.S., CBP SAYS

Grady is a longtime civil servant with more than 28 years' experience at the Departments of Defense and Homeland Security.

On Monday, in another DHS shakeup, officials said Secret Service Director Randolph  Alles was stepping down.

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 Homeland Security was imminent.

Trump has long signaled his displeasure with the rising number of illegal immigrants attempting to enter the country. The U.S. Border Patrol this week said it has set a new monthly record for apprehensions of families at the southern border, driven primarily by a surge of parents and children leaving Central America.

In this June 25, 2018, image Border Patrol agents load a migrant from Guatemala into a van after he was caught trying to enter the United States illegally in Hidalgo, Texas. (AP Photo/David J. Phillip, file)

In this June 25, 2018, image Border Patrol agents load a migrant from Guatemala into a van after he was caught trying to enter the United States illegally in Hidalgo, Texas. (AP Photo/David J. Phillip, file)

CLICK TO GET THE FOX NEWS APP

The agency said Tuesday that it apprehended 92,607 people at the U.S.-Mexico border in March.

Just over 53,000 of the people apprehended were parents and children traveling together, which the Border Patrol refers to as "family units." That breaks a record set in February, when the agency apprehended 36,000 parents and children. Another 8,975 were children traveling alone.

The large numbers of families have forced many line agents into humanitarian roles and have strained detention facilities built when the Border Patrol primarily apprehended single adult men.

Fox News' Brooke Singman and The Associated Press contributed to this report.