Hundreds, perhaps thousands, of Mexicans who were expelled from the country by immigration officials in Southern California will be allowed to return for a chance to make their case to stay in the United States, the American Civil Liberties Union said.

A settlement approved by a federal judge in Los Angeles applies to Mexicans in Southern California who waived rights to a hearing when they were expelled — a procedure known as voluntary return.

The U.S. Department of Homeland Security said Friday that it estimates that "a very small fraction" of roughly 30,000 people who returned voluntarily from Southern California during the period covered by the settlement will be eligible for another chance.

ACLU affiliates in Los Angeles and San Diego sued the Homeland Security's secretary and other immigration officials in 2013, saying authorities used deceptive tactics. A settlement was reached in August, but the order by U.S. District Judge John Kronstadt defines who is eligible to make their case to immigration judges under the class-action lawsuit.

The agreement applies to Mexicans who left voluntarily from June 2009 to August 2014 and have reasonable claims to remain in the country. They had to have been processed by officials in the Border Patrol's San Diego sector or by Immigration and Customs Enforcement's Los Angeles or San Diego field offices.

The Border Patrol long offered voluntary returns to nearly all people it arrested. But in recent years, the agency has embraced procedures that carry stiffer administrative and criminal penalties, including formal deportation orders and criminal prosecution.

Some Mexicans were not fully warned of the consequences of voluntary returns, which included a 10-year ban on applying to re-enter the country for one person who married a U.S. citizen and had a U.S. citizen child, said Gabriela Rivera, an attorney for the ACLU of San Diego & Imperial Counties. In some cases, people were given forms with a box already checked that they agreed to leave the country voluntarily, she said.

The August settlement requires the government to provide detailed information about the consequences of a voluntary return, establishes a hotline for questions, gives people an opportunity to contact an attorney or someone else they choose, and prohibits authorities from pressuring anyone to accept the offer, Rivera said.

Homeland Security said Friday that its component agencies — ICE and Customs and Border Protection — do not tolerate deception or coercion. ICE is revising its literature for notifying people who are about to be expelled from the country.

"In an effort to address the issues raised in this litigation, both agencies have agreed to supplement their existing procedures to ensure that foreign nationals fully comprehend the potential consequences of returning voluntarily to Mexico," the department said.

Initially, only the nine plaintiffs were given a chance to return to the country. Rivera said they are living with their families in the U.S. while awaiting hearings before immigration judges.

The Department of Homeland Security's press office did not immediately respond to a phone or email message left after business hours. Customs and Border Protection spokesman Michael Friel had no immediate comment.

Advocates plan to promote news of the settlement extensively in Southern California and Mexico. Only the ACLU and organizations it approves will be allowed to submit applications to the federal government, Rivera said.