WASHINGTON – The Trump administration settled a federal lawsuit on Friday that could pave the way for thousands of Central American families to reunite with their families in the U.S., according to federal court documents.

The lawsuit, filed in San Francisco, challenged the ending of the Central American Minors program, which helped minors from El Salvador, Guatemala, and Honduras gain entry into the U.S. for refugee resettlement. The program, which was started in 2014, was ended under President Donald Trump in 2017. The program's ending left nearly 3,000 children in limbo as they had already been approved for the program but had not yet gained entry into the U.S.

The settlement allows the government to continue processing the 2,714 minors who were left in limbo when the program was ended and, if approved, would allow them to reunite with family in the U.S. The settlement still needs to be approved by a judge.

"We are so pleased that after many years apart our clients will finally have the opportunity to reunite with each other in safety," said Linda Evarts, an attorney with the International Refugee Assistance Project, which was representing the families in the lawsuit. "These families belong together here in the United States, and we are hopeful this settlement will allow for their swift reunification."

The lawsuit was filed last year after the Trump administration ended the program. It was brought by 12 children and parental applicants into the program.

The settlement follows an order in March by U.S. Magistrate Judge Laurel Beeler that ordered the Trump administration to continue processing children who had already been conditionally approved for resettlement into the U.S.

More:Trump says 'strongly looking at' plan to send immigrants to sanctuary cities

More:Trump’s advisors tell him to charge ahead on immigration, even as courts shut him down

More:Why Donald Trump's sanctuary cities plan faces roadblocks

U.S. Citizenship and Immigration Services agreed to file a detailed plan for processing the applicants by Thursday.

When the first large waves of migrants started flooding the southwestern border in 2012, the Obama administration established the Central American Minors (CAM) Refugee Parole Program, which allowed them to apply for refugee status within their own countries. The program officially launched in 2014 and only allowed certain parents who are lawfully present in the U.S. to request entry for their child.

CAM allowed Central American minors to submit their claims, and learn their fate, without having to make the dangerous trek to the U.S. border. That program was terminated by the Trump administration.

The administration has pushed an alternative plan, forcing all migrants to remain in Mexico while their asylum applications are decided.

The settlement was announced during a particularly tumultuous time as a massive shakeup at the Department of Homeland Security, which oversees immigration enforcement, has led to a handful of top officials leaving the department. Those leaving include DHS Secretary Kirstjen Nielsen.

Also on Friday, the president acknowledged he was mulling an idea to ship illegal immigrants to sanctuary cities, particularly targeting liberal strongholds in hopes of hurting Democrats. The revelation was first reported by the Washington Post.

"Due to the fact that Democrats are unwilling to change our very dangerous immigration laws, we are indeed, as reported, giving strong considerations to placing Illegal Immigrants in Sanctuary Cities only," Trump posted on Twitter.

More:Another top DHS official is leaving, paving the way for President Trump's pick to run the agency

More:'A new level of inhumanity': Democrats denounce White House idea to release migrants in sanctuary cities

Contributing: Alan Gomez