WATCH: Senate committee questions Mayorkas on security at the border, fighting terrorism

The Senate Judiciary Committee held a hearing on oversight of the Department of Homeland Security with Secretary Alejandro Mayorkas testifying.

Watch Mayorkas’ remarks in the player above.

For about four months before President Joe Biden took office, advisers engaged in intense internal debate about how quickly they should undo his predecessor’s hardline border policies.

The answer, almost always, was that Donald Trump’s mark couldn’t be erased soon enough.

Immigration advocates on the transition team defiantly shot down a detailed memo circulated among top aides that called for turning back some migrants who cross illegally by making them seek protection in other countries. They pushed back against estimates of soaring migration flows if Trump’s policies were dismantled.

In the end, Biden recognized predictions that more migrants might come to the border, but he was firm that policies instituted by Trump were cruel and inhumane and had to be jettisoned.

Biden took office on Jan. 20. Almost immediately, numbers of migrants exceeded expectations. Plans outlined in a December document to fully resume asylum processing at land crossings were soon overtaken by events.

Children traveling alone shattered previous highs in March, making up most of the more than 4,500 people housed in temporary tents that were designed for 250 under COVID-19 standards. The Border Patrol encountered migrants in South Texas more often than ever in June and July, dashing expectations for a common summer slowdown.

In September, about 15,000 mostly Haitian refugees were camped under a bridge in the small border town of Del Rio, Texas. The chaotic scene stretched on for days as migrants waded back and forth across a river for supplies and families slept in squalor. Images of agents on horseback corralling refugees went viral.

The administration began a massive expulsion of Haitians while allowing thousands to remain in the U.S. Its uneven response after months of rising arrivals sparked sharp criticism from both the right and left, illustrating the consequences of scrapping Trump’s policies without a new asylum system in place.

Some key developments could not have been predicted by any administration, and predating Biden was a major structural problem of immigration courts taking nearly four years on average to decide cases of immigrants not in custody.