Four years ago on a sweltering afternoon, Bakersfield Police Det. Damacio Diaz was sitting in his car alongside informant Guillermo "Memo" Magallanes.
About $15,000 stuck out of Magallanes' shorts. When the informant left, the narcotics detective found just under $1,000 in the passenger-side door pocket.
"He told me to take my wife out on a date or buy my kids something," Diaz would later recall in court papers. "It is a day I truly regret and a decision that has changed my entire life."
That decision also rocked the Kern County criminal justice system, marking the beginning of an ugly police corruption scandal involving cash, drugs and protection. Diaz and his partner, Patrick Mara, later admitted to ripping off drug dealers of their methamphetamine during traffic stops. Diaz then began cooperating with federal investigators and named other cops he said were corrupt.
Now, local prosecutors say the scandal jeopardizes other criminal cases.
Kern County Dist. Atty. Lisa Green is sending letters to defendants in 64 potentially tainted criminal convictions after her office examined scores of convictions involving the work of the disgraced pair.
"The disgraceful and criminal behavior of Diaz and Mara has gravely impacted the Bakersfield Police Department as well as our community as a whole," she said.
Prosecutors are specifically reexamining cases from 2011 to 2014, when the partners were committing crimes.
"If they took statements, seized evidence or wrote reports, we will be sending letters to defense attorneys or defendants that represented themselves," she said.
Two misdemeanor prostitution cases in which Diaz as an undercover detective was the only witness have already been dismissed.
It was a huge fall from grace for Diaz, who was well known in the Central Valley as being a member of the high school cross-country running team portrayed in the 2015 Disney movie "McFarland, USA."
Green's office reviewed 87 cases of the detectives involving 123 defendants before deciding to send the letters. Diaz, a 17-year Bakersfield cop, worked on 32 cases involving 53 defendants, with 20 requiring letters, she said. Mara, a 13-year veteran, had 55 cases involving 70 defendants. Forty-four of his cases will result in letters.
Defendants could seek motions for a new trial or to withdraw pleas in some cases. The district attorney's office is prepared to retry the cases if necessary, Assistant Dist. Atty. Scott Spielman said.
The ramifications of the corruption scandal could be large.
"How is the district attorney going to oppose any motion for a new trial when these investigators have admitted to such rogue behavior?" said Ben Meiselas, who is representing several families suing the Bakersfield police, included a man shot while allegedly an informant for Mara.
Defense attorneys compared the Bakersfield situation to the Los Angeles Police Department's Rampart scandal in the late 1990s, in which corrupt officers tainted cases. More than 100 convictions were overturned as a result.
"What is going on here is really outrageous," said criminal defense attorney Mark Geragos.
Acting U.S. Atty. Phillip A. Talbert said the two detectives were specially selected for a joint drug task force in a region plagued by methamphetamine.
"They became the drug traffickers themselves," he said. "Their actions risked their fellow officers' safety for greed."
Both officers have expressed remorse.
Diaz said that his time as a narcotics detective drove him to a life of drinking and that Magallanes, a drug dealer and a prominent member of the Mexican Mafia, became more friend than informant.
Mara said that when he partnered up with Diaz in spring 2012, Diaz walked out of a bedroom and handed him "a few hundred dollars, while he stuck a large amount of money into his own pockets," according to court papers.
That year, Mara filed for bankruptcy and said he was drinking heavily.
Soon Diaz and Mara were getting into other illegal activities, authorities said. Federal prosecutors in court sentencing documents said Mara had two patrol officers stop a vehicle the detectives knew was carrying 5 pounds of methamphetamine. They pocketed 4 pounds and turned in just a pound as evidence, officials said. This behavior became common, prosecutors said.
Diaz's loyalty to Magallanes would be his downfall. The detective tipped him off about a Drug Enforcement Administration wiretap that captured him chatting, advising him "to lay low," according to documents. Magallanes then told another drug dealer to dump his phone.
Assistant U.S. Atty Brian Delaney said Magallanes was arrested in a separate case and told officials about Diaz.
Diaz would quickly implicate Mara and then suggest others were making money too.
"He gave them information to clean up the department," said his lawyer, David Torres, in an interview. But U.S. Atty. Talbert said that "we concluded no officers were complicit in joining Diaz and Mara," and that no further prosecutions were planned at this time.
During the investigation, five other officers were placed on administrative leave related to the investigation and one recently resigned.
But Bakersfield Police Chief Greg Williamson said the federal and internal inquiries after 18 months cleared them all.
"They investigated every name that came up, uncovered every rock, and no one else's name came to light in their scandal," the chief said. "We have also done internal investigations on many allegations that were made and once again they have been unable to uncover" anything.
Still, Williamson said, the corrupt detectives had eroded trust with the community.
Diaz this summer pleaded guilty to bribery, drug trafficking and tax evasion, and Mara admitted to selling methamphetamine. Both are about to begin five-year federal prison sentences for their crimes.
Follow @lacrimes on Twitter