MIAMI (CBSMiami) – Two former Miami police officers received long prison sentences Friday for protecting drug dealers who were actually FBI agents.

Kelvin Harris was sentenced to 27½ years and James Archibald received 120 months in federal court.

READ MORE: Dolphins Dominate Depleted Giants 20-9 For 5th Straight Win

The investigation started when Miami police received complaints that the officers were dirty.

The City of Miami Police Department launched its own probe and brought in the FBI. As part of the undercover operation, the officers believed they were being hired to help the “traffickers” move cocaine.

Schonton ‘Michelle’ Harris, James Archibald and Kelvin Harris (City of Miami Police)

Investigators identified the officers as Schonton Harris, Kelvin Harris and James Archibald.

Schonton Harris, who pleaded guilty with conspiring with other officers to possess cocaine, was sentenced back in April, to 15 ½ years in prison.

READ MORE: Injunction Denied In Health Care Vaccination Fight

Earlier this year, the US attorney said veteran officer Kelvin Harris and officer James Archibald were recruited by officer Schonton Harris. They reportedly took payments to protect individuals involved with money laundering and narcotics trafficking.

Schonton was paid $17,000, while Kelvin Harris earned $10,000 and Archibald made $6,500, Fajardo Orshan said.

The FBI said the people the officers thought were drug dealers were actually undercover agents.

Officials said the investigation lasted several months and it started with a single person coming forward to make a complaint.

In one case, the officers reportedly agreed to protect a shipment of two thousand opioid pills.

MORE NEWS: Experts Believe Other States Could Switch To Electric Mowers Like California

Charges included conspiracy to possess cocaine with the intent to distribute.