(Reuters) - The Trump administration has agreed to allow approximately 2,700 children living in Central America to be reunited with their parents in the United States under a court settlement announced on Friday, according to court documents.

FILE PHOTO: Migrants attend a workshop for legal advice held by the Familia Latina Unida and Centro Sin Fronteras in south Chicago, Illinois, January 10, 2016, a part of campaigns being held nationwide as a reaction to the United States government's announcement that it would step up deportations of Central Americans families that arrived since May 2014. REUTERS/Joshua Lott/File Photo

The settlement follows a lawsuit that challenged a decision in 2017 by President Donald Trump’s administration to shut down a program that allowed children living in Central America to be reunited with parents residing legally in the United States.

The Central American Minors program, which began in 2014, allowed parents living legally in the United States to request refugee status for their children residing in Guatemala, El Salvador and Honduras.

Many of the parents are in the United States under the so-called temporary protected status, which allows immigrants from countries that have suffered natural disasters, civil conflicts or other problems to stay in the United States.

Last month, U.S. Magistrate Judge Laurel Beeler in San Francisco ordered the government to resume processing children who had been conditionally approved for the program when it was terminated by the Trump administration.

The settlement, which must be approved by a judge, requires the government to finish processing children who were in the final stages of their applications when the program was ended, the International Refugee Assistance Project (IRAP), which represented the plaintiffs, said in a statement.

It said the government anticipates most applicants will be approved and allowed to travel to the United States.

“We are so pleased that after many years apart our clients will finally have the opportunity to reunite with each other in safety,” IRAP attorney Linda Evarts said in the statement.

“These families belong together here in the United States, and we are hopeful this settlement will allow for their swift reunification,” she said.

The U.S. Citizenship and Immigration Services agency, which signed the settlement, did not immediately respond to a request for comment, nor did the U.S. Justice Department.