A retired Philadelphia police detective was sentenced Tuesday to 40 months in federal prison for bribing a former colleague to gain a competitive advantage in the city’s lucrative towing and stolen-car-retrieval industry.

Despite his conviction last year on counts including conspiracy, fraud, and lying to investigators, Victor Gates, 73, maintains that he did nothing wrong — a stance U.S. District Judge Wendy Beetlestone characterized Tuesday as concerning.

“Sir, you are a criminal,” she told him during a hearing in federal court. “You have been determined to be a criminal by a jury of your peers. I am concerned that in your mind that this manner of doing business is normal. …. Just how things are done in Philadelphia.”

Gates, a decorated 30-year veteran of the police force, chose to not say anything when given the opportunity to address the court.

The case against him arose from a stolen-car-retrieval business he devoted himself to after his 2007 retirement. Among his clients were car rental agencies at the Philadelphia airport who paid him to help find vehicles that had been stolen or not returned.

Witnesses at his trial last spring testified that Gates paid former police Detective Patrick Pelosi, then assigned to Southwest Detectives, to fast-track the release of cars that had been recovered and impounded by the police.

As a result, the cars did not undergo mandatory police inspections required before they can be cleared from a national law enforcement database of stolen vehicles, and the rental companies were able to put them back into service more quickly.

Representatives from at least one of the companies, Avis, were aware of Gates’ relationship to Pelosi and encouraged him to exploit it to benefit their business, evidence at the trial showed. Avis paid Gates more than $760,000 for his services between 2008 and 2015.

“Gates has forever tarnished whatever legacy he may have built,” Assistant U.S. Attorney Eric L. Gibson told the judge Tuesday. He “disgraced his former employer, embarrassed his former colleagues, and corrupted a former police detective who viewed Gates as a mentor.”

In total, investigators said, Gates paid Pelosi more than $25,000 in regular installments between 2008 and 2015. (Pelosi pleaded guilty in 2017 to charges including bribery and lying to investigators, and was sentenced last year to one year and one day in prison.)

But Gates’ lawyer, Samuel C. Stretton, argued Tuesday that authorities — and the jury — had misunderstood his client’s relationship to Pelosi.

“What really happened is that Mr. Pelosi was a close friend of Mr. Gates,” Stretton argued in court filings. “Mr. Pelosi was going through a financially crippling divorce and was in severe financial distress. Mr. Gates felt sorry for him and issued him a $300 check every month to help him.”

Stretton vowed that Gates would appeal his conviction and criticized the lawyer who represented him at trial, James J. Binns, for refusing to call witnesses to vouch for the retired detective’s character, and dissuading Gates from testifying on his own behalf.

Beetlestone, however, rebuffed Stretton’s push to keep Gates out of prison, saying it was important to send a message to the community and other officers that these types of crimes are taken seriously.

She ordered him to report to prison July 1. In addition to his prison term, Gates was ordered Tuesday to pay more than $670,000 in court fines, fees, and forfeiture penalties. He will have to complete two years of probation upon his release.