(Oliver Munday/For The Washington Post)

It may have taken protests and graphic videos of people being killed by cops for some to get the message that policing in America is in crisis. But pop culture has been steadily warning audiences about this for years. You can watch blockbusters about the impact of the drug war, TV shows about the rot of institutional dysfunction and documentaries about the improper use of force by cops. No wonder public confidence in the police hit a 22-year low last year, with only 52 percent of Americans telling Gallup pollsters that they have deep trust in police. Those divisions are even more stark when broken down by race: Between 2014 and 2016, just 29 percent of African Americans expressed confidence in the police, compared with 58 percent of whites. Police in the popular imagination, as in the news, are not necessarily the good guys.

But it wasn’t always this way for the police or for pop culture. In the 1960s, more than 70 percent of Americans said they had a “great deal” of respect for their local police, and less than 10 percent said they believed police brutality was happening in their communities. Film and TV shows of the era reflected this perception, with portrayals of model cops who cared as much about social services as crime-fighting. Hollywood depicted a simpler time with simpler policemen.

This conceit slowly vanished from the screen after the country survived a major violent crime wave beginning in the 1960s and learned more about the way police work is practiced. Audience appetites for morally ambiguous antiheroes grew, and Hollywood perfectly tracked Americans’ changing ideas. Where the studios have mostly failed: offering compelling ideas about what cops ought to be, instead of grim diagnoses of what policing has become.

Though they differed in style and tone, many early cop shows built their heroes on the same basic model. Officers like “Dragnet’s” Joe Friday (played by series creator Jack Webb), “Naked City’s” Jimmy Halloran (James Franciscus) and “The Andy Griffith Show’s” Andy Taylor (Griffith) respected the law and always solved the crimes in question before the end of the episode.

Such narratives offer closure for the officers who kill. But what about the victims? (Adriana Usero/The Washington Post)

Rather than fighting a war on crime that treated civilians like enemy combatants, they were their community’s protectors. Friday and Halloran were visibly shaken in early episodes in which they shot suspects dead. Sheriff Andy avoided gunplay altogether. And all of these cops provided social services to the most vulnerable among them: They recognized that sometimes the best way to prevent crime was to get help for people suffering from psychological problems or poverty. Friday and his partner help a soldier returning from a deployment to reconcile with his mentally ill wife, who wanted to abandon their children. Halloran and a fellow officer protect a “sidewalk fisherman,” who collected coins from sidewalk grates, from an extortionist. Unlike the fictional cops who followed them, Friday, Halloran and Taylor policed communities where crime was an aberration to manage rather than a tidal wave that threatened the very fabric of their cities. And they didn’t face tough choices between respecting suspects’ rights and closing cases.

This vision of policing was a fantasy even then, and it couldn’t last. Webb produced “Dragnet” in close collaboration with the Los Angeles Police Department; it was propaganda for the agency, despite its problems with racial bias and a militarized style of policing that would roil the city in later years. “The Andy Griffith Show” was ostensibly set in the 1960s, but the imaginary town of Mayberry was such a throwback that it sometimes seemed unmoored in time.

As violent crime rose and clearance rates (the percentage of investigations that result in arrests) began to fall in the 1960s, it became harder for Hollywood to tell credible stories about highly effective cops who always emerged victorious without seeming naive to the point of delusion. And as insiders such as Joseph Wambaugh — an LAPD detective sergeant who in 1971 published “The New Centurions,” a searing novel about policing in the years leading up to the 1965 Watts riots — began to tell their stories, shows like the LAPD-approved “Dragnet” and “Adam-12” came across as square and intellectually compromised.

Artists who wanted to present cops as heroes had to dial back their assessments of how much good individual officers could do in police departments that were understaffed and suffering from a loss of status. Shows like the comedy “Barney Miller,” which premiered in 1974, and the drama “Hill Street Blues,” which arrived in 1981, presented their main characters as decent people struggling to solve what crimes they could, even if the cities around them seemed increasingly ungovernable. In the 1981 movie “Fort Apache, the Bronx,” Paul Newman played Murphy, an Irish cop who provided the same sort of community services Sheriff Andy Taylor did, including delivering a baby. But no matter his good intentions, Murphy couldn’t restore his burned-out neighborhood or dissuade his captain from mass arrests. His commitment to his work became a badge of individual honor rather than a cure for an irreparably broken system.

More darkly, movies like “Dirty Harry” and “The French Connection” argued that the old traditions of policing, including a reluctance to use firearms and respect for suspects’ rights, were obstacles in the war on crime. “Popeye” Doyle (Gene Hackman), who fought a heroin cartel in “The French Connection,” and “Dirty” Harry Callahan (Clint Eastwood), who pursued a serial killer freed on a phony police brutality charge, weren’t pleasant people.

The poster for “The French Connection,” which shows Doyle shooting a fleeing suspect, or the savage pleasure Callahan seemed to feel in telling suspects on the wrong end of his gun to ask themselves “Do I feel lucky?” are particularly jarring today. These are blatant executions — Doyle’s shooting would be outlawed under the Supreme Court’s decision in Tennessee v. Garner — that would shock the conscience if they were captured by a cellphone or a body camera. But “Dirty Harry” and “The French Connection” were raw expressions of real anger about violent crime and the sense that police departments were failing to use every available weapon to stop it. The very idea of the model cop, in this telling, was part of what held city officials back from cleaning up their streets.

Fictional cops weren't always a half-step below superheroes. (Adriana Usero/The Washington Post)

By the time Hollywood started telling stories about heroic cops again in the 1980s, the model had changed. The idea that policing was a social-service job was gone, and the vision of cops as action commandos was in. This was partly a consequence of “Jaws,” which in 1975 made the action-packed blockbuster an essential part of the movie business. So the new fictional police officers graduated from Doyle and Callahan’s limited, intimate confrontations to dramatic car chases and wild shootouts with heavily armed foes.

Their drug-war enemies justified the new level of spectacle and violence, and police didn’t grieve when they shot someone. In movies like 1984’s “Beverly Hills Cop,” 1987’s “Lethal Weapon” and Michael Bay’s 1995 blockbuster “Bad Boys,” fictional officers Axel Foley (Eddie Murphy), Martin Riggs (Mel Gibson) and Roger Murtaugh (Danny Glover), and Mike Lowrey (Will Smith) and Marcus Burnett (Martin Lawrence) fought highly organized drug cartels that relished carnage. When these cops shot up suburban neighborhoods, blew up trucks full of flammable chemicals or confronted cartel leaders on airport tarmacs, they weren’t stepping out of bounds. They were simply prosecuting a war as it needed to be fought. In the 1950s and 1960s, cops agonized over even the most justified shootings; in this new generation of action movies, police officers who were hesitant to fire their weapons were portrayed as dupes or even psychologically weak.

These stories were a stark contrast with the earlier “Hill Street Blues,” which depicted the struggles of an under-resourced police department in an unnamed American city. The new tales mirrored policy changes in the 1980s and 1990s, as local chiefs rushed to form SWAT teams and the federal government shipped military surplus gear to departments around the country. In both fiction and reality, action was exciting and ascendant.

At the turn of the century, questions about the conduct of the war on drugs and Los Angeles’s anti-gang efforts coincided with a major shift in television storytelling. Antiheroes such as Tony Soprano (James Gandolfini) — characters who inspired a transgressive thrill in the audiences that rooted for them — were in, and clear-cut heroism was out. This gave showrunners a powerful new way to frame police stories. Rather than squeaky-clean officers mopping up their cities, antihero cops could be tools for showrunners to critique bad policing practices. Even broadcast procedurals, including “Law & Order: Special Victims Unit” and “Law & Order: Criminal Intent,” which premiered during this period, emphasized the psychological strain of police work, taking their detectives down dark, morally ambiguous paths.

In 2002, Shawn Ryan’s “The Shield” premiered on FX, introducing audiences to Vic Mackey (Michael Chiklis), the leader of a special Los Angeles police squad modeled on a real anti-gang unit from the LAPD’s Rampart division, which became embroiled in a wide-ranging corruption scandal. At the beginning of the series, “The Shield” presented Mackey as a necessary evil in the style of Dirty Harry, a cop whose excesses his co-workers tolerated because he could close difficult cases and obtain confessions from hideous criminals. But by the end of the show’s run, Mackey’s colleagues found a way to purge him and the other members of his team from the LAPD. As victories go, Mackey’s exile didn’t feel very good; even the cops who brought him down had looked the other way for years.

While “The Shield” presented Mackey as a cancer that metastasized in the LAPD, “The Wire,” which premiered the same year, argued that the drug war was a disease that was deforming police departments, a vision confirmed by a grim 2016 report from the Justice Department on the state of policing in Baltimore, where the HBO series took place. Its characters, particularly homicide detectives Jimmy McNulty (Dominic West) and Lester Freamon (Clarke Peters), spent the five seasons of “The Wire” trying to survive in a system that devalued their skills and their desire to dismantle criminal syndicates, instead favoring meaningless street-level drug arrests. By the final season, McNulty and Freamon were so disgusted by the department’s priorities that they invented a serial killer to attract resources to their investigations. This corrupt act was the only way, in the show’s telling, to do good police work.

Now, a new generation of TV shows and movies is attempting to create something artistically and politically difficult: credible model cops who aren’t naive about police failures or the difficulty of changing entrenched policies.

Both “Zootopia,” Disney’s animated movie about a bunny who joins a police department dominated by larger mammals, and “Brooklyn Nine-Nine,” Fox’s comedy about a New York detective squad, draw their drama from similar tensions.

Judy Hopps (voiced by Ginnifer Goodwin) and Jake Peralta (Andy Samberg) want to be super-cops. For Judy, the first bunny officer in the city of Zootopia, that means cracking a big case involving predator mammals gone mysteriously savage. For Jake, it means emulating his idols, John McClane of “Die Hard” and the “old school” cops of the New York Police Department. But they both have to set their preconceptions aside to do good police work. Judy must learn to overcome her implicit biases about predators to find the culprit, while Jake has to recognize that the NYPD of the past was defined as much by racism, homophobia and brutality as it was by big mob cases.

Part of good policing in these stories is letting go of old fears and old ideals. In forging a friendship with a fox, Judy learns that building trust among citizens can do as much to keep a city safe as bagging a thief. And in “Brooklyn Nine-Nine,” Peralta’s captain, Raymond Holt (Andre Braugher), learns that the best way to improve public confidence in the police isn’t with an ad campaign featuring good cops, but by showing that the department is open to criticism and suggestions. He takes down the old ads and replaces them with new ones that read: “We know we can do better. Tell us how.” He gives citizens his email address.

These new cops don’t have all the answers, and they know it. Theirs is a less-comforting fantasy than Joe Friday’s cool certitude or Andy Taylor’s folksy moral clarity. But their honesty in uncertainty suggests a new possibility: a model cop who points a true way forward, rather than one who obscures problems or seeks solutions in a dream of the past.

Twitter: @AlyssaRosenberg

Read more from Outlook and follow our updates on Facebook and Twitter.