MIAMI (CBSMiami) – Harold James went from putting criminals behind bars to sitting in the cell next to them Tuesday when he was sentenced to 15 months in federal prison for protecting a sports-betting ring.

James, 29, faced between one-and-a-half and two years in prison after reaching a plea deal with prosecutors. James resigned last November and was caught after a fellow officer worked with the feds after Miami-Dade Police raided the gambling ring in Liberty City.

READ MORE: Miami Weather: Temps In The 30s This Weekend

James was alleged to have provided protection to a courier engaging in illegal activity last year a business behind a Sunoco gas station in Liberty City. James originally faced two counts of extortion for allegedly protecting protection for “the cashing of fraudulent checks” in exchange for cash payments.

During his hearing, James and other crooked cops were laid into by U.S. District Judge Robert Scola, Jr.

READ MORE: Possibility Of New Surfside Building Has Residents Worried

“Criminals are set free because our community can’t believe our police officers,” said Judge Scola. “The city of Miami Police Department has a culture of corruption that exceeds all other police departments.”

James’ attorney said the former cop is a good kid who did a stupid thing.

“I have no doubt that he will take this experience and use it in a positive way in some other form of ministry, which is essentially how he saw his law enforcement career,” said defense attorney Tony Moss.

James is one of 12 Miami police officers who face federal criminal charges or internal discipline for their alleged role in gambling protection schemes and other criminal activities. All of the officers have resigned or relieved of duty.

MORE NEWS: South Florida Winn Dixie & Fresco y Mas Pharmacies Expect To Get N95 Masks On Friday

(TM and © Copyright 2013 CBS Radio Inc. and its relevant subsidiaries. CBS RADIO and EYE Logo TM and Copyright 2013 CBS Broadcasting Inc. Used under license. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed. The Miami Herald contributed to this report.)