Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

SAN DIEGO — A federal judge has ruled that Ken Cuccinelli was unlawfully appointed to lead the U.S. Citizenship and Immigration Services agency and, as a result, lacked authority to give asylum seekers less time to prepare for initial screening interviews.

Cuccinelli, a former Virginia attorney general and an immigration hardliner, was named to a new position of “principal deputy director” in June, which immediately made him acting director because Lee Francis Cissna had just resigned. The agency grants green cards and other visas and also oversees asylum officers.

U.S. District Judge Randolph Moss in Washington found Cuccinelli's appointment violated the Federal Vacancies Reform Act, a 1998 law governing who is eligible to lead federal agencies in an acting capacity. The impact of the ruling wasn't immediately clear.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

The ruling issued Sunday was at odds with President Donald Trump's penchant for temporary appointments. At Homeland Security, Chad Wolf is acting secretary, and the heads of Customs and Border Protection, Immigration and Customs Enforcement and Citizenship and Immigration Services are also in acting roles.

The judge wrote that Cuccinelli didn't qualify for exceptions for officials who won Senate approval for other positions or spent 90 days in the previous year at the agency.

The administration's reading of the law “would decimate this carefully crafted framework,” Moss wrote in his 55—page ruling. “The President would be relieved of responsibility and accountability for selecting acting officials, and the universe of those eligible to serve in an acting capacity would be vastly expanded.”

Moss, an appointee of President Barack Obama, set aside a Cuccinelli directive to give asylum seekers less time to consult attorneys before an initial screening interview, but his decision applies only to the five Hondurans who sued. He did not address other Cuccinelli actions.

The asylum directive gives asylum seekers at least one calendar day to prepare for the screening interview, instead of 72 hours for families and generally 48 hours for single adults. Extensions are granted only “in the most extraordinary circumstances,” such as a serious illness or mental or physical disability.

The directive is a foundation for new policies aimed at quickly completing the screening, known as a “credible fear interview,” without leaving Customs and Border Protection custody.

Homeland Security Department spokeswoman Heather Swift said, “We obviously disagree with the court's opinion and are looking more closely at it.”

Cuccinelli is now acting deputy Homeland Security secretary, the department's No. 2 position. Joseph Edlow, a longtime congressional aide who joined Citizenship and Immigration Services in July, was named last month to run the agency's day-to-day operations.