A New York judge on Wednesday threw out state fraud charges against Paul J. Manafort, President Trump’s former campaign chairman, dealing a setback to efforts by the Manhattan district attorney to ensure Mr. Manafort would still face prosecution should Mr. Trump pardon him for his federal crimes.

Mr. Manafort was charged in Manhattan with mortgage fraud and more than a dozen other state felonies in March, shortly after he was sentenced in federal court for similar crimes. His lawyers argued that the state charges covered the same conduct for which Mr. Manafort had already been tried.

Justice Maxwell Wiley of the State Supreme Court agreed on Wednesday, ruling that the indictment violated a state law against double jeopardy, which says that a defendant may not be tried twice for the same offense.

“Basically, the law of double jeopardy in New York State provides a very narrow window for prosecution,” Justice Wiley said during a short hearing before releasing a 26-page decision.