A US judge has dismissed criminal charges against former FBI Director James Comey and New York Attorney General Letitia James, ruling that the prosecutor who brought the charges was unlawfully appointed.

Judge Cameron Currie stated that Lindsey Halligan, selected by Trump to pursue the charges against Comey and James, lacked the eligibility to assume the role.

Both Comey and James asserted their innocence, characterizing the prosecutions as politically charged. The White House commented, emphasizing that the indictments' facts remain unchanged and this ruling is not the final chapter.

Trump has persistently criticized Comey and James, claiming they are guilty as hell and demanding swift justice.

Judge Currie noted Halligan, a former White House aide with no prior prosecutorial experience, was not authorized to present charges to the grand jury. She ruled that all actions taken under Halligan's appointment were unlawful exercises of executive power.

The judge highlighted that Halligan's appointment violated legal statutes governing interim US attorneys, as her appointment came after a 120-day period without a valid interim designation.

The cases were dismissed without prejudice, which allows for the possibility of re-filing in the future. White House Press Secretary Karoline Leavitt indicated that they plan to appeal the decision.

In response to the ruling, Comey expressed gratitude over the dismissal of charges rooted in malevolence and incompetence but anticipated further actions from Trump.

James stated her commitment to fighting against baseless charges as she continues to advocate for New Yorkers.

Considered a politically motivated case, the dismissal highlights the intersection of law and politics during Trump's administration.