On Tuesday, Mr. Llakatura, 38, was sentenced to 14 years and 3 months in prison.

“The defendant’s crimes — committed by a man entrusted with a badge, a gun and a solemn duty to protect and serve the community — are nothing short of shocking,” prosecutors wrote.

The sentencing, in Federal District Court in Brooklyn, brought an end to the brief but brutal reign of terror that Mr. Dervishaj and his henchmen — who, like Mr. Llakatura, were largely Albanian immigrants — inflicted on Astoria’s residents and businesses. Mr. Llakatura was originally charged in the case in 2013 and pleaded guilty in December 2015. Last March, following a two-week federal trial, Mr. Dervishaj was sentenced to 57 years in prison. A few months later, another member of his crew, Denis Nikolla, was sentenced to 18 years in prison.

Mr. Dervishaj was a notorious criminal known for wreaking havoc in and around New York City’s Albanian community. In 2007, he was shot while demanding $20,000 from a contractor in Queens, the authorities said. Five years later, he was accused of stabbing a man to death with a butcher knife at a bachelor party on Staten Island, though a grand jury declined to charge him in that case.

According to his lawyers, Mr. Llakatura, who was fired from the police force after he entered his guilty plea, “made a big mistake” by teaming up with Mr. Dervishaj, a gangland figure whose brother, Plaurent Dervishaj, is an international fugitive wanted by Interpol and by American authorities. “He involved himself with the wrong people,” Mr. Llakatura’s lawyers wrote, “and did not think of the potential consequences.”

Even after Mr. Llakatura was arrested in December 2013, he continued to pursue his victims, prosecutors said. According to an informant he met at the Metropolitan Detention Center in Brooklyn, Mr. Llakatura sent members of his own family to find the owner of the seafood restaurant in a failed attempt to retaliate against him for cooperating with the government.