ALBANY, N.Y. (AP) — A judge disqualified a federal prosecutor from overseeing investigations into New York Attorney General Letitia James, ruling Thursday that he had been serving in his post unlawfully when he requested subpoenas.

U.S. District Judge Lorna G. Schofield blocked subpoenas requested by John Sarcone, the acting U.S. attorney for the Northern District of New York.

The judge stated that the Justice Department did not follow statutory procedure after judges declined to extend Sarcone’s tenure. “When the Executive branch of government skirts restraints put in place by Congress and then uses that power to subject political adversaries to criminal investigations, it acts without lawful authority. Subpoenas issued under that authority are invalid. The subpoenas are quashed, and Mr. Sarcone is disqualified from further participation in the underlying investigations.”

James, a Democrat, had challenged Sarcone’s authority after he issued subpoenas seeking information about lawsuits she filed against President Donald Trump, claiming he had committed fraud in his business dealings, and separately against the National Rifle Association and some of its former leaders.

Justice Department lawyers maintained that Sarcone was appointed properly and that the subpoenas were valid. James claims the inquiry into her lawsuits is part of a campaign of baseless investigations and prosecutions of Trump’s perceived enemies.

The ruling is part of a broader pattern of legal challenges concerning unusual maneuvers by the Trump administration to retain federal attorneys without Senate confirmation. Recent rulings in various jurisdictions have echoed similar concerns about the legality of appointees and their actions.