John Langley, who created the long-running TV show “Cops” which helped usher in the reality TV era, died Saturday of an apparent heart attack in Baja, Mexico, according to his reps. He was 78. Langley was competing in the Coast to Coast Ensenada-San Felipe 250 off-road race.

“Cops” was canceled in 2020 after the George Floyd protests, and had become controversial for showing primarily the point of view of the police.

For 32 seasons, it was a reality TV juggernaut, running for over 1,000 episodes and introducing the cinéma vérité style of documentary to television. The familiar theme song by Ian Lewis of Inner Circle became a part of pop culture. It remains in production for overseas networks.

After being canceled by Fox in 2013, “Cops” moved to the Spike network, now Paramount Network before being canceled again in 2020. A podcast had detailed how police were able to remove portions of the shows that showed them negatively and how some people were coerced into signing waivers.

After trying for several years to find a network, Langley and his production partner Malcolm Barbour were able to get the show on the air at the fledging Fox in the aftermath of the 1988 Writers Guild strike, since it had no union writers.

In its early years, “Cops” was nominated four times for Emmys in the outstanding informational series category. Barbour retired in 1994.

When Langley was honored by NATPE in 2013, Variety wrote, “Before the show premiered, Langley recalls, there was considerable doubt whether anybody would agree to have their image used in the context of being arrested. ‘The network thought it was a legal nightmare,’ he says. By the time ‘Cops’ had been on a few years, though, that became almost a non-issue. In fact, one of the occasional logistical pitfalls involved people seeing the camera crews and beginning to hum the show’s ‘Bad Boys’ theme, as they or someone else were being marched off to jail.”

Before moving into TV, Langley wrote and co-directed the 1983 documentary “Cocaine Blues” with Barbour. Pop culture figures including Frank Zappa, Hoyt Axton and Paul Krassner appear in the documentary which also features footage of a drug raid with undercover officers.

Langley started out in reality television with his 1986 special “American Vice: The Doping of a Nation,” which showed live drug arrests on primetime television.

He went on to produce series including “Inside American Jail” for TruTV and “Las Vegas Jailhouse,” both with his son Morgan. His other productions included “Street Patrol,” “Vegas Strip,” “Road Warriors” and “Undercover Stings.”

He was a producer on Antoine Fuqua’s “Brooklyn’s Finest,” a crime drama that screened at the Sundance Film Festival. His other documentaries included “Terrorism: Target USA” and “Who Killed JFK?”

Born in Oklahoma City, Langley served in the intelligence unit of the U.S. Army in the early 1960s before graduating Cal State Dominguez Hills and attending U.C. Irvine for grad school.

Langley told the TV Academy in 2009, “I’m a kid of the 60’s. I’m sort of anti-authoritarian by nature. If you told me I was going to do a show about cops, I would have said, ‘What am I going to call it, Pigs ?'”

A racing enthusiast, he started the Cops off-road desert racing team.

Langley’s son Morgan, who oversees Langley Productions and is an executive producer of “Cops,” survives him as does his wife Maggie, son Zak, daughters Sarah Langley Dews and Jennifer Blair, as well as seven grandchildren.