A 36-year veteran of the San Francisco Police Department could go to jail for as long as five years, after a jury agreed that he'd pulled in at least $25,000 in bribes from taxi drivers who might otherwise have failed the written exam required for a cab permit.

69-year-old Fremont resident Paul Makaveckas had worked SFPD's Taxi Detail for over 20 years, according to the San Francisco's District Attorney's Office, and was "the police officer in charge of selecting, administering, and grading the SFPD taxi cab exam, which occurred on Thursdays at the Hall of Justice."

He was also, the DA's office says, "personal friends with the owner of Flag-A-Cab taxi school, William Hancock."

So here's how prosecutors say Makaveckas' racket worked:

Hancock would meet with the prospective taxi cab drivers at the Hall of Justice during the lunch break of the SFPD taxi cab test on Thursdays, and would collect $100 from each prospective driver who wanted a guaranteed passing grade. Hancock would then give all of the money he had collected to Makaveckas, who was the police officer in charge of grading the exam.

According to the Examiner, the FBI began investigating the case after receiving a tip on January 26, 2007. On March 10, 2009, "Hancock wore a wire and recorded a conversation during which Hancock gave Makaveckas $500 in bribes," the DA's office says.

That day, Makaveckas "was removed from his office...by authorities who attempted to question him," and was placed on leave, the Chron reported at the time. He "retired" shortly thereafter, was arrested on November 30, 2010, and was charged in December 2010.

He'd remained free on bail until Monday, when he was "found guilty of accepting bribes from prospective taxi cab drivers through William Hancock during the two year period leading up to that recorded exchange," the DA's office said, to the tune of about $25K. He was remanded into custody after the verdict was read, and will be sentenced on September 18, 2015.

(Of course, if you're like me, you're asking what went on those other 18-plus years Makaveckas was overseeing cabs. Was his nose clean until 2007? One wonders, doesn't one?)

Hancock pleaded guilty on March 9 (of this year) to bribing a public official and is expected to be sentenced Aug. 3, the Ex reports.

Though the jury agreed that Makaveckas was guilty of two felony bribery counts, after two days of deliberation they "failed to reach a unanimous verdict, finding 11-1 for guilt" in two others, the DA's office says. According to city administrative code, Makaveckas will also lose his pension as a result of his conviction.

Speaking with the Ex, Mark Gruberg, a board member of the San Francisco Taxi Workers Alliance, described Makaveckas as a “very flamboyant character."

“All I can say is that rumors abounded for many years that this was taking place," Gruberg said.

"This conviction basically confirms what we were all hearing. It’s a good thing justice was done.”

Makaveckas’ attorney told the Chron that there's more to Makaveckas than his bribe-taking, saying that he "was a good police officer who earned eight medals of valor and went undercover as a narcotics officer as well for the FBI."

“I hope people will not forget the commitment and integrity Paul showed as one of the best undercover officers in this department during the ’70s and ’80s,”

The San Francisco Police Department, however, hustled to distance themselves from Makaveckas following the verdict, releasing a statement announcing that "Makaveckas has been separated from the department since the onset of this investigation."

"The SFPD fully cooperated with our partner agencies in securing this verdict," the statement read. "The public’s trust is everything to us (SFPD) - as such, this case has been one of great concern. The officer involved not only betrayed the public’s trust but also the trust of the honest, dedicated, men and women of this proud department who work so hard to keep this great City safe."

District Attorney George Gascón appears to agree, saying via press release that “This individual abused his position of power.”

“He was sworn to serve the public, instead he chose to serve himself.”