A bail bond agent cannot keep the premium when a criminal defendant was denied bond and never released from custody, the state Court of Appeals ruled Tuesday.

The decision unanimously settled an issue that was in play at the U.S. Court of Appeals for the Second Circuit in the case of Arthur Bogoraz, whose wife and friends posted $2 million bond for Bogoraz following his 2011 arrest for a multimillion insurance fraud in Brooklyn.

The premium paid in March 2012 to Ira Judelson, a bail bond agent affiliated with International Fidelity Insurance Co., was $120,560. When a state court rejected the bond at a bail sufficiency hearing and kept Bogoraz behind bars, Judelson kept the money.