It’s hard to understand why, exactly, Republicans and Democrats in Washington fought so fiercely and angrily about anti-gang legislation the House of Representatives passed last week. Couldn’t this be a rare situation where both sides are right?

Republicans argued that modern gangs are the 21st century equivalent of Al Capone’s Mafia, if not worse, because they terrorize entire communities. It’s hard to argue with that, or with Republicans’ contention that gangsters ought to be treated like gangsters – subject to federal anti-racketeering laws and tough, mandatory penalties for serious offenses.

That said, Democrats are also right to note that law enforcement is by no means the single bullet that will eradicate gang violence.

We can lock gangbangers in jail, but they are likely to be replaced by younger generations until society can address the social problems that lead so many young people to lives of crime.

And there are many such problems.

There’s the breakdown of families, poverty, failing schools and a lack of opportunity and constructive activities for kids. There’s a popular culture that glamorizes the thug lifestyle, and there’s a lack of a strong social and cultural network to look out for kids in trouble and intervene where necessary.

So why – other than ideological stubbornness and sheer partisanship – should Democrats and Republicans be at odds on this issue? Both sides’ approach is needed in a full-fledged war on gangs. We need to reach out to those at risk and come down hard on those terrorizing their communities.

Pomona Police Chief James Lewis approved of the House bill because it will allow his department to treat gangs as organized crime syndicates. By that standard, this new legislation is a positive step.

But James understands the value of intervention for those at risk of sliding into gang life. So does Los Angeles Police Chief William Bratton, who said intervention programs are ‘‘the major missing link.”

As Wes McBride, president of the California Gang Investigators Association, put it, ‘‘When a gang kid comes to me and says, ‘I want out, I need help,’ I need to be able to point him to a program. But that’s not what this bill does. This bill is prosecution-oriented, and it’s needed.”

Rather than fighting a good but incomplete effort, Democrats would be better served pushing for legislation that addresses the social causes underpinning gang violence, as Sen. Dianne Feinstein is doing. And Republicans would do well to join them in that effort.