On issues ranging from an assault rifle ban to racial progress in the U.S., the public and the police stand on opposite sides of a wide attitudinal divide. At the same time, majorities of police officers and the public favor the use of body cameras, favor relaxing some restrictions on marijuana, and believe that long-standing bias against police was at least some of the motivation for the protests that followed many of the deaths of blacks during encounters with police in recent years.

The contrasting views and notable similarities between the attitudes of police and the public emerge from two Pew Research Center surveys. One was of 7,917 sworn police officers from departments with at least 100 officers conducted online last May to August by the National Police Research Platform, and the other was of 4,538 adults conducted by mail and online last August to September. The surveys included a number of identically worded questions, which allowed for direct comparisons of the views of officers and the public on a range of issues.

Among the more striking takeaways from these surveys was the very different way the police and the public view the deaths of blacks during encounters with police. Two-thirds of officers (67%) view these fatal encounters as isolated incidents, a view shared by only about four-in-ten Americans (39%).

The public and police diverge on a range of other issues, sometimes by even larger margins. For example, when it comes to the work police do day in and day out, 83% of Americans say they understand the risks and challenges that police face. Roughly the same share of police (86%), in a similarly worded question, say they believe the public does not understand the risks officers face on the job. This is among the largest gaps between police and the public found in these surveys. One example of this disconnect: More than eight-in-ten Americans (83%) believe the typical officer has fired his or her weapon at least once in their career. By contrast, about a quarter (27%) of officers say they have done so.

Other differences were not quite so large. About two-thirds of all Americans (64%) favor a ban on assault-style weapons and roughly the same share of police (67%) oppose such a restriction. More broadly, the surveys found that a larger share of police than the public believe it is more important to protect the rights of Americans to own guns than to control gun ownership (74% of police vs. 53% of the public).

The views of police and the public also differ sharply on whether the country has made the changes needed to give blacks equal rights with whites. A lopsided majority of officers (80%) say the country has made the necessary changes. But the public is more divided: 48% say the needed changes have been made while 50% believe that more changes are needed to assure equal rights for black Americans.

Underlying the police views on this question is a substantial difference between black and white police officers – a difference that is, in fact, larger than the gap between the public and police. About nine-in-ten white officers (92%) but only 29% of black officers say the needed changes have already been made (though black officers are about twice as likely as blacks overall to hold this view).

When it comes to the similarities between the police and the public, the surveys found that majorities of both groups favor the use of body cameras to record police interactions with citizens, though there was still a sizable difference in views on this question (66% of police versus 93% of the public). The police are also less likely than the public to believe body cameras would change the behavior of officers: Half of all officers say body cameras would make officers more likely to act appropriately, compared with 66% of all adults.

Large majorities of police (68%) and the public (84%) also support easing some legal restrictions on marijuana, though the public is more likely than officers to support the legalization of marijuana for both personal and medical use (49% vs. 32%).

While officers and the public differ on a ban on assault-style weapons, the views of both groups are closely aligned on other gun-control measures. For example, more than nine-in-ten officers (95%) and close to the same share of the public (87%) favor laws that would prevent the mentally ill from purchasing guns. About the same proportions of the police and the public favor background checks for people who buy firearms at a gun show or from a private individual (88% and 86%, respectively). A majority of police and a larger share of the public also support the creation of a federal database to track gun sales (61% and 71%, respectively).

And while police and the public draw different lessons from the recent fatal encounters between blacks and police, the two groups broadly agree that long-standing anti-police bias was at least some of the motivation behind the demonstrations that followed many of these incidents (92% for police and a smaller but still substantial majority of 79% for the public). Police are also more likely than the public to say anti-police views were “a great deal” of the reason behind the demonstrations (68% vs. 41%).

Other survey measures underscore the differences between police work and the typical job. For starters, these surveys suggest police view their jobs as more dangerous: Police officers are three times as likely as workers overall to say they nearly always or often have serious concerns about their physical safety while on the job (42% vs. 14%).

Officers also are more likely than employed Americans overall to say their jobs frequently make them feel frustrated, and they are somewhat less likely to say they feel fulfilled by their work. About half (51%) of officers say their job nearly always or often frustrates them, compared with 29% of all workers. About four-in-ten officers (42%) say their work leaves them feeling fulfilled, compared with 52% of all workers.