After Jan. 20, the Biden administration and the Democratic Congress will face urgent calls to act on several fronts. Few issues will require more immediate action than immigration. The deterrence of immigration through cruelty was perhaps President Trump’s single most successful set of policies. For four years, Trump put in place hundreds of draconian measures to dissuade immigration to the United States, persecuting undocumented families and young “dreamers” and abusing the rights of thousands seeking asylum.

President-elect Joe Biden is under pressure to deliver on his promise to dismantle Trump’s nativist machinery in earnest. On Friday, he said he would introduce an immigration bill “immediately” upon taking office. This is the right thing to do. Even if, given the Democrats’ slim Senate majority, comprehensive immigration reform remains unlikely, Biden should still send a bill to Congress in the first 100 days of his presidency as a matter of principle. “He would be planting a flag on the mountain top, telling the country that this is where we are heading, and it’s only a matter of when,” immigration activist Frank Sharry told me.

Even if a more ambitious agenda proves elusive, Biden will have several options to undo the damage Trump wrought on immigration. “Unwinding executive orders and DHS operating procedures should be quick and relatively easy,” Sharry told me, referring to the Department of Homeland Security. Biden could halt deportations and establish priorities solely on public safety considerations, freeze the construction of the border wall and reduce incarceration of immigrants with an emphasis on reuniting hundreds of children who have been separated from their parents.

And, if the new president’s goal is to alleviate the pain of thousands of immigrants, he should aim to reset the relationship with Mexico, a country Trump extorted into becoming an active immigration enforcement partner and the recipient of thousands of potential refugees, now stranded there while they wait for asylum under the controversial “Remain in Mexico” scheme. It has become a humanitarian disaster. A recent Human Rights Watch report details the list of appalling crimes — including abduction, extortion and sexual assault — immigrants suffer in Mexico.

According to Maureen Meyer, vice president for programs at the Washington Office on Latin America, a leading research and human rights organization, the program “has exposed 60,000 asylum seekers to unnecessary risk and dangers in Mexico.” The Mexican government’s severe austerity measures (it cut federal funding for many migrant shelters) have made matters worse. The government of President Andrés Manuel López Obrador, Meyer told me, “has failed miserably in providing this population with humanitarian protection, public services, access to housing or any measure of safety.”

Biden should end the program and work with Mexico to reverse its pernicious consequences.

To wind down the program for good, the new administration will have to ramp up processing capacity at the border, developing the infrastructure and manpower needed to provide background checks and expeditiously process the necessary paperwork to begin asylum requests. It could then place possible refugees in a humane alternative to detention facilities. These improvements will not be immediate. The Biden administration could also fundamentally improve the lives of about 27,000 refugees who have already been processed and are waiting in Mexico or their countries of origin.

There is another path the new administration could take to improve the lives of the thousands waiting for asylum in Mexico and the thousands more that, perhaps inevitably, will make their way toward the northern border in the coming months. Under López Obrador, Mexico remains unprepared to process and protect immigrants. The Mexican Commission for Refugee Assistance (COMAR), the agency in charge of refugees, has a minuscule yearly budget of just under $5 million to help tens of thousands of immigrants and hundreds of thousands of displaced Mexicans. Mark Manly, who heads operations for the UNHCR, the United Nations’ refugee agency, in Mexico, told me that “COMAR still mostly depends on the UNHCR’s financial and technical support.”

The country’s shelter infrastructure fares worse. In a decision that dismayed many in charge of migrant shelters, the government cut federal funding for facilities that are crucial on both borders. Forced to operate with large budgetary gaps, shelters are at capacity, also relying on the assistance from the UNHCR. This has forced thousands of immigrants onto the streets. The stories of abuse, torture and sexual slavery are horrifying. WOLA suggests Mexico and the United States should work together to invest in the country’s infrastructure. The United States could take a proactive role, directly investing in COMAR, supporting the civil society organizations that run shelters and, crucially, demanding the Mexican government improve its dismal treatment of immigrants through, among other things, investment in a modern network of sanctuaries that offer basic services and safety.

There is one problem: This requires the active partnership of the Mexican government. For Meyer, the López Obrador administration is unlikely to agree to the construction or refurbishment of migrant shelters. “The Mexican government is reluctant to set up huge infrastructure at the border because that leads to a sense of permanency,” Meyer told me.

While the concern is understandable, the current humanitarian emergency — and the arrival of future groups of migrants — make the improvement of Mexico’s shelter capacity an unavoidable decision, on practical and moral grounds. The Biden administration should make that clear. The fate of thousands, currently facing unimaginable daily hardship, depends on it.

Read more: