A former New Jersey police officer was sentenced today to three years in prison for stealing more than half a million cigarettes and extorting $20,000 from an undercover FBI agent he thought was a drug courier.

Mario Rodriguez, 40, was an officer in the Jersey City Police Department on July 3, 2013, when he drove to a Secaucus warehouse with an accomplice, broke into a trailer with a bolt-cutter, and stole 600,000 cigarettes and several television sets, federal authorities said.

The pair then drove to Staten Island, where they met with a friend of the accomplice, who was actually an undercover officer. Rodriguez took a $5,000 payment for the cigarettes and kept three of the TVs.

During another meeting with the undercover agent on July 10, Rodriguez conspired to rob a drug courier, who in reality was yet another undercover officer. The second undercover officer told Rodriguez the "drug courier" would sell them $20,000 worth of cocaine in a Jersey City parking lot.

The parking lot was under surveillance as Rodriguez drove up. Rodriguez approached the "drug courier" who was waiting with another man. Rodriguez identified himself as a police officer and pretended to arrest the man, threatened to arrest the drug courier, and took the cash, federal authorities said.

Rodriguez pleaded guilty to cargo theft and extortion. In addition to the prison sentence, he must serve three years of supervised release and pay a $2,000 fine.