Last night, I tuned in to the livestream of the events in Ferguson, Mo., where police mounted a disproportionate and militant response to protesters who were asking for answers about the death of 18-year-old Mike Brown, who was killed by an officer. This morning, I looked in a very different direction, to “The Andy Griffith Show,” which debuted on CBS in 1960 and starred Andy Griffith as Mayberry’s Sheriff Andy Taylor.

The gap between Ferguson and Mayberry is striking and important. As my colleagues have reported, Ferguson’s overwhelmingly white police force “bears little demographic resemblance to the citizens of this St. Louis suburb, a mostly African American community whose suspicions of the law enforcement agency preceded Saturday afternoon’s shooting.”

Even when it began, executives acknowledged that “The Andy Griffith Show” was a nostalgic portrait of small-town life. But it expressed an ideal that has leached out of American pop culture and public policy, to dangerous effect: that the police were part of the communities that they served and shared their fellow citizens’ interests. They were of their towns and cities, not at war with them.

Much of the crime-related tension in “The Andy Griffith Show” comes from the contrast between what people think real police work is and what the Sheriff knows it to be. In the pilot episode of the sitcom, the only crime is a case of jaywalking by an elderly woman, brought in by Taylor’s overzealous deputy, Barney Fife (Don Knotts).

In another episode, a manhunt for an escaped criminal brings higher authorities to town. Barney frets: “What are the state police going to think when they come here and find we got an empty jail? They’re gonna we’re just a hick town where nothing ever happens!” For Barney, the welfare of the community is an abstraction compared with his idealized sense of what it means to be a cop.

Sheriff Taylor ultimately outsmarts the overreaching state cops to catch the fugitive. He knows his town well enough to guess which back road the fugitive might use, to read the concern in an elderly woman’s voice and to direct the wanted man to a leaky row boat as an escape vessel, enabling the state police to pick him up without firing a shot.

And his work is not confined to crime. Sheriff Taylor is the kind of man who opens up for a drug store owner who is running late to work and helps an elderly woman deal with a new pharmacist who does not want to give her pills without a prescription. He helps a talented local guitarist who is making a nuisance of himself find a job with a traveling musician. When his housekeeper gets married, Sheriff Taylor performs the rites. His kindness and his sense of Mayberry matter far more than his capacity for violence.

Not only is this sort of work absent from contemporary pop culture about policing, the idea that such service to the community is not quite real police work lingers under two of the funnier and more thoughtful recent movies to engage with the idea of the idea of an escalated war on crime.

Both “Hot Fuzz,” a 2007 comedy from British director Edgar Wright, and “21 Jump Street,” the 2012 reimagining by Christopher Miller and Phil Lord of the 1987-1991 television series, feature bumbling officers who dream of action-movie heroics rather than their mundane duties. Instead of disabusing their notions, both films indulge these characters by providing threats that demand a military-style response.

In “Hot Fuzz,” rural cop Danny Butterman (Nick Frost) is bitterly disappointed when Sgt. Nicholas Angel (Simon Pegg), a newcomer to the small town where Butterman grew up, fails to confirm the idea of urban police work that Butterman has gleaned from American movies like “Point Break” and “Bad Boys II.”

The joke of “Hot Fuzz” is that the over-the-top tactics and weapons Danny dreams of employing turn out to be necessary. A sinister cabal is murdering anyone who mars the small-town charm. Butterman, Angel and their fellow cops dust off their moldering riot gear, take a weapons cache out of evidence and lay waste to the criminals.

In “21 Jump Street,” rookie cops Schmidt (Jonah Hill) and Jenko (Channing Tatum) are bitterly disappointed when they are assigned to patrol a local park. When action arrives, they lack the basic competence to respond. After they arrest a drug dealer, he has to be released because Schmidt and Jenko forget to read the man his Miranda rights. But their dream of action heroism redeems them. The drug dealers reappear, and Schmidt and Jenko are the only people who are strapped up with enough weaponry to defeat them.

These are the movies that are actually engaging with the idea of police escalation rather than simply adopting such tactics in the name of exciting action sequences.

The Fast and the Furious” franchise started out with cops investigating street-racing teams who stole electronic equipment. Six movies later, the cops and robbers are using tanks and planes to fight each other over a super-weapon. As Vox culture editor Todd VanDerWerff pointed out, Fox’s recent drama “Gang Related” is premised on the idea that police departments are only responding to criminals’ acquisition of sophisticated technology. “The Heat,” a Paul Feig comedy starring Melissa McCarthy and Sandra Bullock, suggests that all Bullock’s uptight FBI agent needs to do to get better at her job is spend a night out drinking and learn Boston-style police aggression. McCarthy’s character is grounded in her Southie neighborhood, but mayhem takes the day.

In “The Dark Knight Rises,” the conclusion to Christopher Nolan’s Batman trilogy, the Gotham cops get extraordinary and coercive powers, but even those do not prove to be enough for the police to defend themselves against uber-criminal and terrorist Bane. That is actually rather generous: most superhero movies involve threats so large that the police are irrelevant in the response, showing up mostly in crowd sequences to promise their support on the ground to costumed avengers who are fighting in the air.

The legacy of Mayberry stays alive in the world of television showrunner Michael Schur, the co-creator of “Brooklyn Nine-Nine.” In that show, like ABC’s short-lived drama “The Unusuals,” the police deal with a range of misdemeanors and violent crimes rather than going to war with high-tech criminal syndicates or fiendishly clever serial killers.

The cops are defined by their relationship to their neighborhood and the department. One officer, Jake Peralta (Andy Samberg) grew up in Brooklyn, as did the precinct secretary (Chelsea Peretti), while their colleague Charles is a relative newcomer to the neighborhood and a devotee of the borough’s foodie culture. Their captain, Ray Holt (Andre Braugher) was one of the first New York City cops to come out on the job, but he is ambivalent about the department where he has had to fight to succeed.

But even in “Brooklyn Nine-Nine,” cops train to raid buildings. And the first season ended with Jake getting his dream assignment: a chance to go up against some real criminals as part of a task force targeting the mafia.

“We need more TV shows and movies that reflect the world we’re seeing in news reports from Ferguson, and we need ones that do so directly,” Vox’s VanDerWerff wrote. “Fiction helps us process and make sense of the world, and there’s room in the images out of Ferguson (and so many other cities) for an earnest and nuanced consideration of what happens when police officers are given military-grade weaponry.”

It would be nice if culture were honest about the consequences of scenarios that make for high-stakes police chases and artfully choreographed action sequences. But that is still only a partial solution to a culture that is deeply invested in the idea that being a cop means going to war against criminals rather than being a part of a community. I don’t know that we can go back to Mayberry, if it ever existed. But American fiction and American towns could use more cops like Sheriff Andy Taylor and fewer warriors like the ones in Ferguson.