A federal judge ruled on Sunday that Ken Cuccinelli was unlawfully installed as the acting director of the U.S. Citizenship and Immigration Services.

President Donald Trump’s appointment of Cuccinelli, who also serves as the acting deputy secretary of the Homeland Security Department, violated the Federal Vacancies Reform Act of 1998, U.S. District Judge Randolph Moss declared in his 55-page decision.

Only an official designated as “first assistant,” as defined by the FVRA, can assume the role of acting USCIS director when the vacancy arises, according to the ruling. Cuccinelli initially was appointed to the new position of principal deputy director. At the same time, the USCIS order of succession was revised to include the principal deputy director as a first assistant. Both of these changes occurred after the vacancy had arisen.

“Cuccinelli may have the title of Principal Deputy Director, and the Department of Homeland Security’s order of succession may designate the office of the Principal Deputy Director as the ‘first assistant’ to the Director,” Moss wrote. “But labels — without any substance — cannot satisfy the FVRA’s default rule under any plausible reading of the statute.”

Policies put in place under Cuccinelli, including reducing the time granted for asylum seekers to schedule “credible fear” interviews during expedited deportation proceedings, are now void, Moss ruled.

Trump appointed Cuccinelli, a former attorney general of Virginia and staunch supporter of the president’s hard-line immigration agenda, as head of USCIS in June of last year.

DHS “obviously disagree[s] with the court’s opinion and [is] looking more closely at it,” Heather Swift, a spokeswoman for the department, told Reuters in a statement.

The White House did not immediately respond to a request for comment.

The Trump administration will likely appeal the decision, Carl Tobias, a professor at the University of Richmond’s School of Law, told HuffPost.

“If the judge’s ruling prevails, it may have broader implications for some of Trump’s many choices who have the acting title,” Tobias added.

“The ruling may also affect other immigration policies that Trump officials want to take in the immigration area if this or other judges similarly view them as acting outside the Vacancies Act,” he added.

Read Moss’ full decision below: