If fictional cops’ resentment of oversight stemmed from the idea that civilians couldn’t possibly understand what crime-fighting required, those tensions were exacerbated first by the rise of the counterculture and then by class politics that eroded the respect to which cops had become accustomed.

Policing was never an upper-crust occupation. Cops “would never go to Harvard, be received in the White House, or marry J.P. Morgan’s granddaughter,” wrote Thomas Reppetto in the first volume of his history of American policing. But the 1960s saw cop stories grappling with the idea that the police were losing even the modest degree of status associated with the job.

Aaron Spelling’s show “The Mod Squad,” which premiered in 1968, treated police outreach to young dropouts from society as a critical mission, both for a whole generation and for police departments themselves.

“I know what they were before I busted them. And what they can go back to being if this doesn’t work out,” Capt. Adam Greer (Tige Andrews) said passionately in the series’ first episode, defending his controversial new unit and the people he’d recruited for it. “Times change, and a cop had better change with them. They can get into places we can’t.”

In “Serpico,” released five years later, Frank Serpico (Al Pacino) represented a similar kind of cop, defending his facial hair and hippie clothes to his captain as tools he could use to blend in, not evidence of sloppiness. But Serpico wasn’t exactly a rebel: He wanted to rid his department of corruption. His fellow officers conflated Serpico’s style and his campaign for integrity, treating Serpico’s attempts to clean up the department as a sort of traitorous liberalism.

Other stories reflected a perceived decline in the value of police officers. In an episode of “Kojak,” the titular detective offered himself as a hostage, only for another captive to tell him despairingly, "Who cares about a cop?” That sense of crumbling worth persisted. In 1987, “21 Jump Street” Officer Tom Hanson (Johnny Depp) flashed back to a schoolyard fight where a bully taunted him: “My old man’s a fascist, and all cops are pigs.” During a shootout in Kathryn Bigelow’s 1991 movie “Point Break,” a drug-dealing surfer curses FBI agents as “pigs.” The word might have lost its political context, but not its power to insult.

The radicalism of the ’60s would ultimately curdle into a kind of yuppie contempt, where wealthier, more educated characters showed a marked tendency to underestimate and undervalue cops.

An early example emerged in the 1968 movie “The Detective.” Frank Sinatra played Joe Leland, a police officer stuck between two classes. He’s more sophisticated than the cops he works with, but not educated enough for his wife’s ritzy friends to take his opinions seriously.

Such snideness was much more pointed in the 1988 action classic “Die Hard.” At the start of the movie, New York cop John McClane (Bruce Willis) flew cross-country to attend his wife Holly’s (Bonnie Bedelia) office Christmas party. From the beginning, he was uncomfortable with everything from the company’s fancy trappings to Holly’s swift ascent up the corporate ladder.

The movie’s class tensions found their fullest expression not in McClane’s attempts to defeat Hans Gruber (Alan Rickman), the sophisticated robber who took over Nakatomi Plaza in part by pretending to be a political terrorist, but in one of Holly’s co-workers, Harry Ellis (Hart Bochner).

A snob who dismissed McClane as “Holly’s policeman,” Ellis fooled himself into thinking he could negotiate with Gruber, declaring “I negotiate million-dollar deals for breakfast. I'm sure I can handle this Eurotrash.” He presented himself to Gruber as a class equal, bragging “I say to myself, these guys are professional, they're motivated ... Maybe you're pissed off at the camel jockeys, maybe it's the Hebes, Northern Ireland. It's none of my business. I figure you're here to negotiate, am I right?” He was wrong and got murdered for his trouble. It took McClane’s working-class ingenuity and toughness to defeat Gruber on the terms he’d actually chosen: not political or corporate, but criminal.

McClane reunited with his career-woman wife at the end of “Die Hard,” but in “The Wire,” the results of mixed-class relationships ended less happily.

In the show’s third season, Jimmy McNulty (Dominic West), a womanizing detective, began seeing a big-shot political operative, Theresa D’Agostino (Brandy Burre), after his divorce. The intelligence, education and class that made McNulty see D’Agostino as more than his usual one-night stands were ultimately what make the relationship fail. He didn’t fit into her fancy private-school fundraisers or political events, and she saw his work as beneath her. “She [f------] looks through me, Kima,” McNulty lamented to his partner, Kima Greggs (Sonja Sohn), shortly before ending the relationship.