A former New York City police officer who helped a friend and drug dealer distribute cocaine and carried out a fake police seizure to rob a rival drug courier was sentenced Thursday to 11 years in prison.

The former officer, Juan Acosta, pleaded guilty in April to conspiring to commit drug, extortion and firearms offenses.

He was accused of acting as a sort of soldier for a longtime friend, Yorick Rafael Corneil-Perez, as they and others distributed large amounts of cocaine across the city, the United States attorney’s office in Manhattan said. Mr. Acosta had been a beat cop in the Soundview section of the Bronx  assigned to the 43rd Precinct  from 2000 until his arrest in a sting operation in December 2009.

According to the authorities, Mr. Acosta used his badge and a police car in mid-2005 to rob a drug courier who worked for a rival of Mr. Corneil-Perez of several hundred thousand dollars. They said Mr. Acosta also tipped off Mr. Corneil-Perez to which streets were lightly patrolled by officers and agreed to provide protection for a 10-kilogram shipment of cocaine from a Long Island warehouse to the Bronx.