NEW YORK - A judge in New York has refused to allow prosecutors in Brooklyn to back out of a plea agreement with the mastermind of a body parts ring.

Judge Albert Tomei said Wednesday that Michael Mastromarino had cooperated with prosecutors and lived up to his part of the agreement, Newsday reported.

"There is no question in this case the defendant performed what he had to do," Tomei said at a hearing in Brooklyn Supreme Court. "He did it voluntarily, he did it knowing that he would receive a prison sentence."

Mastromarino, a New Jersey oral surgeon who had been deprived of his license, faces a prison term of 18 to 54 years. He was charged with organizing a group including three Brooklyn funeral directors that trafficked in body parts and tissue harvested from cadavers without the permission of relatives.

At the hearing, Assistant District Attorney Monique Ferrell said prosecutors were not aware of the emotional suffering of the families involved when they allowed Mastromarino to plead guilty.