Washington — A federal judge on Sunday ruled that Ken Cuccinelli was unlawfully appointed to a top immigration post in the Trump administration, invalidating some of his directives to restrict the access asylum-seekers at the U.S.-Mexico border have to lawyers.

In his 55-page order, Judge Randolph Moss of the U.S. District Court in Washington, D.C., said Cuccinelli was "not lawfully" appointed last year as acting director of U.S. Citizenship and Immigration Services (USCIS), the agency within the Department of Homeland Security (DHS) that administers and vets benefits for non-citizens like refugees, asylum-seekers and green card holders applying for U.S. citizenship.

Moss said the June 2019 appointment of Cuccinelli, a vocal proponent of President Trump's hardline immigration agenda, violated the Federal Vacancies Reform Act of 1998. The federal judge, an appointee of President Obama, held that Cuccinelli was not eligible to become acting USCIS director last year because the position of principal deputy he initially assumed was not a "first assistant" job, as defined by the 1998 law.

Get Breaking News Delivered to Your Inbox

"Under that commonsense understanding of the meaning of the default provision, Cuccinelli does not qualify as a 'first assistant' because he was assigned the role of principal on day-one and, by design, he never has served and never will serve "in a subordinate capacity" to any other official at USCIS," Moss wrote in his order.

Along with finding Cuccinelli's appointment at USCIS unlawful, Moss voided a directive Cuccinelli issued last year to reduce the time asylum-seekers in so-called "credible fear" proceedings have to receive counsel from lawyers. The judge also invalidated an order that barred asylum officers from granting extensions for the time migrants have to prepare for interviews, except "in the most extraordinary circumstances."

Moss' order stemmed from a lawsuit filed by the Refugee and Immigrant Center for Education and Legal Services (RAICES) on behalf of five Honduran asylum-seekers and their children who received negative credible fear decisions by asylum officers. The judge set aside those decisions, as well as the expedited deportations orders issued against the five asylum-seekers, and ordered USCIS to process their cases again.

It's unclear how Sunday's order will affect Cuccinelli's roles at USCIS and DHS, where he serves as the second highest-ranking official, or the other policies he has put his name on. His official titles are senior official performing the duties of the deputy secretary of DHS, and senior official performing the duties of the director of USCIS.

Since joining the administration after the ouster of former USCIS director Francis Cissna, Cuccinelli has not been nominated for a permanent, Senate-confirmed position. Top Republicans have expressed concerns about confirming Cuccinelli, who once led a political group that criticized establishment GOP lawmakers in the Senate.

USCIS did not respond to requests for comment or say whether the directives Moss set aside had been suspended. A DHS spokesperson said the department disagreed with Sunday's order, which officials are reviewing "closely."

Asylum officers received guidance on Friday night that said the two asylum procedures changed by the Cuccinelli directives that Moss set aside were returning to their previous structures, according to a USCIS source.

"Specifically, the minimum period for consultations will be 48 hours after an alien arrived at a DHS facility and requests for interview continuances or extensions will be determined on a case-by-case basis, as long as the request does not unreasonably delay the credible fear process," the guidance read.