A staggering 144 police officers were killed in the line of duty this year, a national report shows, and for the first time in decades the leading cause was shootings.

Two of those deaths were in Massachusetts, where Yarmouth Sgt. Sean Gannon, 32, and Weymouth Sgt. Michael Chesna, 42, were gunned down.

“When you read it, one of those numbers is yours and it just hits you,” Yarmouth police Chief Frank Frederickson told the Herald. “It’s kind of hard to describe. When I read it … I looked and I thought, ‘Wow, one of those is Sean.'”

Nationwide, 52 of the 144 police fatalities this year were firearm-related deaths. The total number of deaths represented a 12 percent jump over 2017, according to a preliminary Law Enforcement Fatalities Report released Thursday by the National Law Enforcement Officers Memorial Fund.

The data show that firearms-related fatalities are up 13 percent year over year, replacing traffic-related deaths, which had been the leading cause of death for the last 20 years. The shootings happened most often while officers were trying to arrest someone, such as in Gannon’s case. Handguns were the leading type of gun used against cops this year, accounting for 31 deaths. Four officers were disarmed and shot with their own weapon, including Chesna, the report states.

Police chiefs said they have felt the pain of these numbers in real time.

“Statistics don’t lie. We have obviously become very aware of the increase in violence and more so when it strikes you as one of your own, you see the spiderweb of damage that continues,” Frederickson said. “It’s one thing to read about it when it happens far away but when you see it firsthand, it’s pretty amazing how much this impacts so many people.”

Chelsea police Chief Brian Kyes, president of the Massachusetts Major City Chiefs Association, said it seems like “open season on taking a shot at a police officer.”

Both Kyes and former Boston police Superintendent in Chief Dan Linskey pointed to a shift in attitude, not only toward police, but in the willingness of people to pull the trigger. When Linskey confronted someone with a gun early in his career, they would most often surrender, he said, because they wouldn’t want to face the added consequences of shooting at a police officer.

“It seems we’ve lost that competitive edge. Suspects are more likely to engage in violence,” Linskey said. “Law enforcement is in harm’s way.”

The report also details the 9 percent increase in traffic fatalities. Of the 2018 fallen officers, 134 were male and 10 were female. The average age was 41 years, with an average length of 12 years of service.

“It is concerning to see any type of increase, but the men and women in law enforcement across the state and across the country’s primary duty is to keep residents safe and secure and, in doing so, we have to keep ourselves safe and secure and continue to adhere to officer safety practices every day,” Kyes said. “That’s a challenge.”