A federal judge has denied a U.S. government motion to dismiss a lawsuit filed on behalf of thousands of immigrant children by attorneys who say the kids have unconstitutionally been denied the ability to challenge their detention or obtain counsel.

Judge Dolly Gee, of the U.S. District Court for the Southern District of California, said Friday she will grant class status for children in the case, Lucas R. v. Alex Azar.

The lawsuit was filed in June, initially on behalf of seven children who were separated from relatives after entering the United States. Attorneys said the government has violated the children's constitutional right to due process.

Get Breaking News Delivered to Your Inbox

In a phone call with CBS News, attorney Leecia Welch, who is senior director for legal advocacy and child welfare at the National Center for Youth Law, lauded the decision.

"It's a great ruling, we're really excited about it," Welch said.

The class of plaintiffs in the case could ultimately include all of the approximately 13,000 unaccompanied children under federal supervision, Welch said.

Watch special election coverage live on CBSN on fuboTV. Start a free trial