The U.S. saw 135 police officers die in the line of duty in 2016, which is the highest number of fatalities on the job in five years, according to a new analysis.

Nearly half of those who were killed while working this year were fatally shot, including 21 police officers who died in different ambush-style attacks carried out across the country, the National Law Enforcement Officers Memorial Fund said Thursday.

“We must never forget that 900,000 law enforcement officers nationwide risk their lives every day for our safety and protection,” Craig Floyd, the memorial fund’s president and CEO, said in a statement. “This year, 135 of those men and women did not make it home to their families at the end of their shift.”

Other law enforcement officers lost their lives in traffic-related incidents and from suffering heart attacks on the job, the group’s preliminary data shows.

The Brief Newsletter

Sign up to receive the top stories you need to know right now. View Sample

The latest national figure is the highest since 2011 when 177 officers were killed, but it is still under the average annual total of 151 fatalities within the past decade. It also doesn’t come close to 1930, the deadliest year on record for U.S. law enforcement when 307 officers were killed in the line of duty, according to the National Law Enforcement Officers Memorial Fund.

The rise in deaths of on-duty police officers follow racial tensions that stem from several high-profile fatal police shootings of unarmed black men. Law enforcement officers have killed at least 1,058 people this year, according to the Guardian.