El Salvador's legislature has approved a new law that would impose up to 15 years in prison on anyone who negotiates with or offers benefits to street gangs.

The measure approved by the unicameral legislature is the latest in a series of moves aimed at attacking gang violence that helped push El Salvador's murder rate to 103 homicides for every 100,000 residents last year.

The law would punish anyone who benefits from gang activities or acts as an intermediary for gangs. It also prohibits negotiating with gangs by offering reduced sentences for them.

The government wants to prevent a repeat of a 2012 gang truce that provided no lasting reduction in violence and apparently allowed the gangs to become more powerful.