Violent bank crime has become increasingly less common in the past decade, but the rate of robberies has ticked back up in recent years. The nationwide opioid crisis may be a leading factor, an industry expert said.

In its latest report on crime at banks and credit unions, the Federal Bureau of Investigation said that the number of incidents in which perpetrators used a firearm fell 68% last year compared with a decade earlier. Further, there were fewer fatalities during robbery attempts in 2016 — eight, down from 13 in 2006 and 21 in 2005, the FBI said.

Violent crime has dropped for several reasons, including the widespread use of bullet-resistant glass, improved tracking technologies and greater cooperation among financial institutions that have been victims of crime, according to industry consultants and the American Bankers Association.

The overall crime rate is another story. Bank crime rates reached a 10-year high in 2006, with a total of 7,272 violations recorded nationwide, including robberies, burglaries and incidents of larceny. The number started steadily dropping in 2007 and reached a low of 3,961 in 2014. However, the rate has risen each of the last two years, hitting a total of 4,251 in 2016.

Joseph Giacalone, a retired New York City detective who now teaches at John Jay College of Criminal Justice, said he suspects that the national surge in opioid addiction is fueling the rise.

In an analysis conducted by the health care insurer Blue Cross Blue Shield, the number of people diagnosed with an opioid addiction rose 493% between 2010 and 2016.

“If you’ve got a perpetrator with a heroin problem, he’s going to be desperate,” Giacalone said. “They’re looking for the easiest thing they can find” to get money to fuel their habit.

Ironically, banks’ increasing use of physical barriers like bullet-resistant windows in some branches has probably contributed to the rise in nonviolent crime, said Bob Stockwell, the chief technology officer at Stanley Security in Indianapolis.

“If a robber sees bullet-resistant glass, they’ll turn around and go find another branch without glass,” Stockwell said.

Bullet-resistant glass is an effective deterrent, but many branches do not have it because installing it can cost between $60,000 and $150,000 per branch, depending on size, he said.

Banks have added to their arsenal of defenses in other ways, Stockwell said. Most banks use either exploding dye packs in cash bundles, or GPS trackers on cash, to help law enforcement track suspects.

Banks are also making greater use of motion sensors, devices that detect shattered glass and window monitors, Giacalone said. Video-capture technology has also improved immensely in recent years, allowing law enforcement to develop highly detailed portraits of suspects.

“You look at the photos and videos they can get and they’re crystal clear,” Giacalone said. “It’s not like the old days where it’s a VHS tape that they keep copying over. The cameras are getting better and smaller and you can put them in more places” inside a branch.

Even if the opioid epidemic has contributed to pedestrian-level crime, it’s highly encouraging for the banking sector that violent crime has decreased, said Doug Johnson, senior vice president of payments and cybersecurity policy at the ABA.

One reason for the improvement is that banks are doing a better job of sharing information with each other and posting suspects’ photos online, said Carol Dodgen, a former security training officer at BBVA Compass who now works as a bank consultant.

“I always encourage financial institutions to share details with each other when they have had a robbery,” she said. “When you see a photo on social media or billboards, these guys are usually caught.”

The FBI’s annual bank crime report does not track technology-enabled crimes such as identity fraud, ATM skimming or denial-of-service attacks. The ABA manages its own collection of data on ATM skimming incidents and it makes that information available to member institutions to help craft policies to discourage skimming. The ABA has discussed the possibility of the FBI incorporating its data into the FBI crime reports, although no agreement is imminent.

The FBI declined to comment.

Separate from cybercrime, the FBI has developed other tools to combat traditional types of bank crime. It recently created the Wanted Bank Robbers website, which allows users to view crimes by geographic region and to find photos of suspects and additional details on specific crimes.

The ABA also supports the FBI’s efforts to engage in helping local and state law enforcement agencies combat crime, Johnson said. That level of cooperation had not always been present, he said.

“In prior years, we would see a cold handoff from one group to the other,” Johnson said. “Now the FBI has enhanced their desire to cooperate and communicate with banks and with local law enforcement, and they have a lot of experience to offer.”