(Reuters) - U.S. authorities have held some immigrant children who entered the country illegally and without a parent in a temporary “tent city” in Texas for months, violating a 20-year-old court order on how long minors can be detained, according to court filings by civil rights lawyers and immigration advocates.

FILE PHOTO: Children are seen at a tent city set up to hold immigrant children in Tornillo, Texas, U.S., in this U.S. Department of Health and Human Services (HHS) image released on October 12, 2018. Courtesy HHS/Handout via REUTERS/File Photo

More than 500 children have been housed in tents near Tornillo, Texas since August, and 46 have been held there since June, according to a Friday court filing in Los Angeles federal court by civil rights organizations and advocacy groups representing migrant children.

The filing opposes a government request to exempt the Office of Refugee Resettlement (ORR), which runs the tent city as a branch of the U.S. Department of Health and Human Services (HHS), from oversight by a court-ordered monitor.

Under the terms of a 1997 court settlement known as the Flores agreement, U.S. authorities must quickly move immigrant children out of prison-like detention centers, either releasing them to guardians or placing them in state-licensed shelters with access to schooling and legal counsel, generally within 20 days. Tornillo is not such a licensed facility.

The Tornillo tent city was opened in June as a temporary emergency measure as the number of children in ORR custody rose sharply.

Neither ORR nor the Department of Justice immediately responded to requests for comment. In an Oct. 12 fact sheet, HHS said the temporary shelter was necessary because of the number of unaccompanied minors in its care and so that “the Border Patrol can continue its vital national security mission to prevent illegal migration, trafficking, and protect the borders of the United States.”

The tent city houses no children who were separated from their parents. The facility has 3,800 beds and housed about 1,500 children as of Oct. 12, according to a government fact sheet.

“None of the children at Tornillo were receiving schooling or regular mental health care, among other benefits to which they would be entitled if they were placed in a licensed shelter,” said a court filing from Leah Chavla, a human rights lawyer who visited Tornillo on Sept. 24.

The administration of President Donald Trump has made cracking down on illegal immigration a central theme of his presidency.

On Monday the president vowed to reduce or curtail tens of millions of dollars in U.S. aid to three Central American nations, and he called a caravan of migrants bound for the United States a national emergency.

The administration has regularly complained that the Flores settlement has limited its ability to hold illegal immigrants until they can be deported.

The court filings also show the percentage of children at Tornillo who were released to sponsors “dropped significantly” in August from June, according to the court filings.

The Department of Homeland Security said in September it planned to withdraw from Flores.

(The story was refiled to correct the penultimate paragraph to show the percentage of children at Tornillo who were released to sponsors dropped significantly instead of the number dropped significantly.)