Ana Maria Dueñas was waiting for a bus in El Cajon, California, on an April day in 2011 when a Border Patrol agent approached her and asked for her papers. Dueñas had lived in the United States for more than three decades; her five children are US citizens, as well as her six grandchildren. But Dueñas herself didn’t have papers, and so she was taken to a nearby Border Patrol station and instructed to sign a form that read, “I give up my right to a hearing before the Immigration Court. I wish to return to my country as soon as arrangements can be made to effect my departure.”

According to a class action lawsuit filed in 2013 by the American Civil Liberties Union, Dueñas was one of potentially thousands of immigrants who were pressured into expediting their own expulsion by signing Voluntary Departure forms, without being properly informed of the consequences, or of other options. Dueñas alleges that she was told, incorrectly, that she had no chance of obtaining legal status through an immigration judge; that she was threatened with a minimum of two months in detention if she did not sign the form; and that she was not told that once she agreed to leave the United States and her family, she would be barred from returning for ten years. Shortly after being taken into custody she was removed to Tijuana, Mexico, where she’s lived ever since.

Now, Dueñas may have a chance to return. On Tuesday, the ACLU of San Diego and Imperial Counties announced an “historic” settlement with the federal government, which has agreed to reform the voluntary departure process, and to allow the plaintiffs to reenter the country and seek legal status. A federal court still must approve the class portion of the settlement, which would let other people who waived their due process rights return to plead their case. Hundreds of thousands of people were removed to Mexico “voluntarily” over the period covered by the lawsuit, according to the ACLU, meaning that even if only a small fraction are ultimately included in the class, the settlement could reunite a significant number of families.

“We’re very pleased that we were able to reach what we feel is such a favorable settlement,” said Sean Riordan, senior staff attorney for the ACLU of San Diego & Imperial Counties. “It shows that the government can provide better due process protections to people who are subject to immigration enforcement.”

The settlement won’t end voluntary departure, which for many people carries fewer legal penalties than an order of deportation. But the government will have to reform the process. Border Patrol agents will be required to give detailed information about the consequences of waiving the right to an immigration hearing, and to give immigrants considering voluntary departure access to telephones so they can consult lawyers, relatives, and foreign consulates, and reach a newly created hotline with information about the process. Previously, immigrants in short-term custody were not always given time to make calls, Riordan said. As a result even some immigrants who had attorneys were unable to contact them, and agreed to voluntary departure when it was against their interest.

For other people, “voluntary departure could be their best option, sadly, under our broken immigration system,” said Riordan. “What we’ve been able to achieve through this settlement is enacting a number of protections that make treatment in short-term custody more fair.”

The government has also agreed to allow the ACLU to monitor its compliance with the terms of the settlement. “We will monitor ICE and Border Patrol closely to ensure that these agencies never again trick or coerce vulnerable individuals into signing away their fundamental rights,” staff attorneys Mitra Ebadolahi and Gabriela Rivera wrote in a statement.

The settlement has particular resonance given the Obama administration’s efforts to speed up deportation proceedings for the record numbers of unaccompanied children who’ve crossed the border in recent months. Many of the children are appearing in court without lawyers, raising questions about due process. “A lot of the problems in the child migrant crisis have to do with fairness of processing,” Riordan said. “If those values of fairness [affirmed by the settlement] are translated into the unaccompanied minors context, hopefully that would mean better decision-making and better protecting of human rights.”