WASHINGTON (AP) – The head of U.S. Customs and Border Protection has resigned from his job leading the nation’s largest law enforcement agency as agents encounter record numbers of migrants entering the U.S. from Mexico.

Chris Magnus submitted his resignation to President Joe Biden on Saturday, saying it had been “a privilege and honor” to be part of the administration.

Two people who were briefed on the matter told The Associated Press on Friday that Magnus was told to resign or be fired less than a year after he was confirmed.

His removal is part of a larger shakeup expected at Homeland Security as it struggles to manage migrants coming from a wider range of countries, including Venezuela, Cuba and Nicaragua.