NEW YORK (AP) — Bribery and fraud charges against former New York Lt. Gov. Brian Benjamin were tossed out Monday by a federal judge, leaving Benjamin to face only records falsification charges. This prompted his lawyers to say it was tragic that the case was ever brought.

Judge J. Paul Oetken in a written opinion said prosecutors failed to allege an explicit example in which Benjamin provided a favor for a bribe. Which is an essential element of bribery and honest services fraud charges.

Benjamin, a Democrat, resigned after his arrest last April. He pleaded not guilty to charges that he obtained campaign contributions from a real estate developer in exchange for his influence to get a $50,000 grant of state funds for a nonprofit organization the developer controlled.

Benjamin’s arrest had created a political crisis for Gov. Kathy Hochul, a fellow Democrat. She chose him to serve as second-in-command when she became governor following a sexual harassment scandal that drove from office her predecessor, Democrat Andrew Cuomo.

At the time of his arrest, Benjamin’s lawyers had issued a statement saying they planned to show the courts that their client’s actions were laudable rather than a crime. On Monday, attorneys Barry Berke and Dani James said in a statement that the ruling “shows how these wrongful charges so harmed Mr. Benjamin and unfairly cost him his position as Lt. Governor.”

“While today is a great day for justice, democracy and the rule of law, it is tragic that this case was ever brought and such a decision was necessary,” they said.

“From the very beginning, we said we are shocked and dismayed that the prosecution would bring such flimsy and unwarranted charges based on nothing more than routine fundraising and support of a non-profit providing needed resources to Harlem public schools,” the attorneys said.

They wrote that Benjamin was “thankful for his vindication and looks forward to new opportunities to serve the people of New York and his Harlem community.”

A spokesperson for prosecutors declined to comment. Benjamin was the state’s second Black lieutenant governor. During a state Legislature career that began in May 2017, he emphasized criminal justice reform and affordable housing. His district included most of central Harlem, where he was born and raised by Caribbean immigrant parents.

In tossing out the first three charges in a five-count indictment, the judge wrote that appeals courts, including the U.S. Supreme Court, have made clear that proof of a promise was necessary to support criminal charges when payments are made in the form of campaign contributions.

The judge said he also agreed with a separate defense argument that the facts alleged in the indictment, even if true, fail to establish criminal liability. He noted that the government’s timeline of events shows that there was no agreement between Benjamin and the developer at the time Benjamin procured the $50,000 in state funding. The charges that were left intact allege that Benjamin knowingly made a false entry in a record with the intent to impede an investigation.