SAN SALVADOR, El Salvador (AP) — Lawmakers in El Salvador approved stricter prison sentences for crimes against security forces amid a wave of police killings and as part of a broader crackdown on powerful gangs.

Legislation passed late Wednesday raises the penalty for murders of police officers, soldiers or their relatives from 40 to 60 years in prison to 50 to 60 years. Threats against those same groups, previously punishable by eight to 12 years, will now carry 12 to 15.

And a newly created article of the penal code calls for 10 years for other hostile actions such as intimidation, persecution, stalking or surveillance. That rises to as many as 15 for suspects who belong to a gang or use a firearm to commit the crime.

"This could to a certain degree put the brakes on actions by the criminal groups," said Marvin Reyes, leader of the Police Workers movement. But "it's not a total solution, because other strategies are needed to be able to safeguard the lives of police and their families."

He called on authorities to improve working conditions amid increasing attacks that have killed police and sometimes their spouses and children.

So far this year gangs have slain 41 officers, 21 soldiers and three prison guards, mostly when the victims were off-duty.

Lawmakers recently approved a series of prison and administrative measures aimed at toughening treatment of jailed gang members and preventing them from running criminal operations from behind bars.

An estimated 67,000-plus people make up El Salvador's "maras," or street gangs, which are involved in drug trafficking, extortion and other organized crime activities. The country has had among the world's highest homicide rates in recent years.