One of Denzel Washington's greatest roles is that of LAPD narcotics officer Detective Alonzo Harris in Training Day - Antoine Fuqua's 2001 crime thriller about two narcotics officers set over a 24-hour period in the gang-ridden neighbourhoods of the Rampart Division and South Los Angeles.
It's a role that won Washington, who celebrates his 63rd birthday today, an Oscar for Best Actor, and he was praised by critics and fans alike for his turn as the highly decorated but extremely corrupt cop.
But there's another person behind that Oscar win - and the now-legendary role - and that's the double-dealing cop who's said to have inspired Denzel, Rafael Perez.
Puerto Rico-born Perez was an LAPD officer in the late 1980s and 90s, who joined the Rampart anti-gang CRASH (Community Resources Against Street Hoodlums) unit in 1995. It was then that he was immersed into the dark world of police corruption, started dealing a shitload of cocaine and eventually became a central figure in the LAPD Rampart Scandal, an era of widespread police corruption in the late 90s.
In the book Bad: Infamy, Darkness, Evil, and Slime on Screen, writer Aaron Baker says: "The characterization in Training Day of bad cop Alonzo Harris (Denzel Washington) is a composite of the Rampart villains Perez and Mack [former LAPD officer David Mack, who was also involved in the Rampart Scandal]: both Latino and African American, part cop and part gang-banger."
He also mentions that there are other similarities between the film and the real story, saying: "Like both officers, Harris is a serious player with a Salvadoran mistress who recalls Veronica Quesada, the Honduran amante (lover) of Rafael Perez."
Credit: Training Day / Warner Bros
After Perez was arrested, he managed to cut a deal with prosecutors and, across the course of 35 interviews, unearthed a story about widespread police misconduct within the CRASH team.
At his sentencing, he blamed the 'intoxicant' of police power, according to PBS.
"The us-against-them ethos of the overzealous cop began to consume me. And the ends justified the means," he told the court.
"We vaguely sensed we were doing the wrong things for the right reasons. Time and again, I stepped over that line. Once crossed, I hurdled over it again and again, landing with both feet sometimes on innocent persons.
"My job became an intoxicant that I lusted after."
Perez was eventually released from jail in 2001 after serving almost three years of his five-year sentence, and was placed on parole.
However, he's since found himself in yet more hot water, later pleading guilty to new federal charges, relating to shooting and framing Javier Ovando - a member of the powerful 18th Street gang.
He had shot Ovando, leaving him paralysed. Perez then framed him by planting the gun on him, before he was given the 'largest police misconduct settlement in city history', according to the LA Times, being paid $15 million (£11 million).
Perez has also been linked to the controversial and mysterious death of Christopher Wallace - a.k.a Notorious B.I.G - who was shot dead in 1997. In 2007, relatives of the late rapper filed a wrongful death suit against Perez, his former partner Nino Durden, Mack and the LAPD, which claimed that they were responsible for his death.
Credit: 'One More Chance' music video / Bad Boy / Arista
However, Perez has denied any involvement in the murder of Wallace - whose death remains a mystery.
It's all the sort of stuff that's absolutely perfect material for a Hollywood movie: the story of an average Joe getting sucked in to a world of drugs, lies and brutality. And that's before you add in the potential involvement in such a high-profile murder case. Plus, everyone loves it when authority figures fuck up, don't they?
So it's not really any wonder that Washington seemingly sought inspiration from Perez for his characterisation of the aggressive, sociopathic and crooked Alonzo Harris - who remains one of cinema's most compelling baddies to this day.
Featured Image Credit: Training Day / Warner Bros