The Appellate Division, First Department, at 27 Madison Ave. NYLJ/Rick Kopstein

A man serving a 25-year sentence will get a new trial because Bronx prosecutors failed to obtain leave from the court before re-presenting his case to a grand jury, leading to an unlawful murder charge, an appeals court has ruled.

A 4-1 panel of the Appellate Division, First Department, reversed Doran Allen’s 2014 conviction for first-degree manslaughter on Thursday. The majority said the murder charge “lacked jurisdictional legitimacy,” and violated Allen’s “constitutional right to be tried for a felony only upon a valid indictment.”

Although Allen was ultimately acquitted of murder, “the charge’s presence loomed over the trial, and in some way influenced the verdict,” said Justices Rolando Acosta, Sallie Manzanet-Daniels, Angela Mazzarelli and Judith Gische in the unsigned decision.

In dissent, Justice Marcy Kahn said that although prosecutors had committed a jurisdictional error and the murder charge should have been dismissed, “there is no basis, without resort to speculation, for finding any spillover effect” on the trial.

“The evidence introduced in support of the murder count pertained to the same criminal transaction and was otherwise entirely admissible in support of the manslaughter count,” Kahn noted.

Susan Salomon, a senior litigation specialist for the Center for Appellate Litigation, represented Allen, who was also listed on the decision as pro se. She could not be reached for comment.

Bronx Assistant District Attorney Justin Braun represented the government. DA spokeswoman Patrice O’Shaughnessy said the office is considering whether to appeal the decision regarding Allen.

Bronx Supreme Court Justice Ralph Fabrizio presided over Allen’s jury trial.