Two former Philadelphia Police officers were sentenced Wednesday for repeatedly robbing drug dealers while on duty.

Jonathan Garcia, 26, was sentenced to over 17 years in prison while Sydemy Joanis, 28, was sentenced to over five years in prison.

Garcia pleaded guilty in July, 2013 to distribution of heroin, conspiracy to commit robbery, robbery, attempted robbery, and carrying a firearm during and in relation to a crime of violence. Joanis pleaded guilty in February, 2014 to conspiracy to commit robbery, robbery, attempted robbery, and carrying a firearm during and in relation to a crime of violence.

The two officers repeatedly robbed drug dealers while working as police officers in the 17th District, between December 2009 and June 19, 2012.

Garcia and Joanis used a confidential source to help them in their robberies. They gave money to their source and instructed him to buy drugs from suspected drug dealers. The officers told their source to then leave a small amount of the drugs he purchased inside the cars of the dealers.

The two officers would then perform traffic stops on the drug dealers after their source left, find the drugs purposefully left behind by their source and then conduct searches inside the vehicles. The officers would then arrest the drug dealers and steal some or all of the money that they recovered. Garcia and Joanis compensated their source with money and narcotics.

Garcia, who was a three year veteran of the force, was arrested on June 20, 2012 after he sold bundles of heroin to a source cooperating with the FBI. He was officially dismissed from the police force on July 19, 2012. After an internal investigation, Joanis was also officially dismissed and arrested.

In addition to the prison terms, Garcia was ordered to pay a fine of $5,000, a special assessment of $900 and ordered five years of supervised release. Joanis was ordered to pay a fine of $2,000, a special assessment of $400 and ordered to complete three years of supervised release.