This op-ed was jointly written by Salam Al-Marayati, president of the Muslim Public Affairs Council and Mike Downing, deputy chief of counterterrorism at the Los Angeles Police Department.

The mass shooting in San Bernardino is growing in complexity with a terrorism component now added to the investigation. Once the dust settles and we try to move forward, a partnership between religious communities and law enforcement is crucial in helping prevent future incidents of terrorism.

A unique partnership between the Muslim community in Los Angeles and law enforcement was formalized after 9/11, one that could be replicated in communities across the country. Law enforcement leaders set up quarterly forums for the Muslim community to raise issues with the police, raising grievances or offering suggestions. Within any community, police gather intelligence, but a longer-term strategy rests on community engagement and dialogue.

We can’t prevent every case, including the shootings in San Bernardino. Law enforcement officials know they can’t arrest their way out of a larger terrorism problem. And Muslim leaders know they can’t just issue press releases condemning the problem for it to disappear.

Partnerships can be controversial. Some in law enforcement believe that inviting Muslims to the table is like inviting the fox to guard the hen house. And some the civil rights community believe that partnership endorses heavy-handed tactics against minorities. And then some in the Muslim community believe that the government only engages them when it involves national security.

No, a partnership won’t eliminate all potential for terrorism. But without help from local communities, law enforcement cannot deal with the problem of terrorism by only looking at the criminal side. Law enforcement must focus on a criminal component, while communities focus more on an ideological role, but the two go hand-in-hand.

A partnership between religious communities and law enforcement optimizes the forces fighting larger problems with violence and terrorism. Law enforcement officials must be able to identify what is Islamic within American Muslim communities, and what is terrorism that has nothing to do with any religion.

The dual effort where law enforcement brings perpetrators to justice and communities identify and push back against the violent ideology, fortifies efforts to fight terrorism through both prevention and intervention. So we have to leverage that strength now to extend assistance to families and friends of those who are becoming radicalized to violent extremism.

Politicians have thrown out ideas of intrusive surveillance of communities and even ID cards for American Muslims in response to the Paris terrorist attacks. But American Muslims are critical in defeating in terrorist groups like ISIS.

You cannot bomb away bad ideology. You can only replace it with good theology. Similarly, you cannot incarcerate your way out of violent extremism. But you can intervene in cases where young people are considering joining terrorist groups. To be effective, that intervention must be initiated and run by local religious communities.

Based on a neighborhood watch model, a partnership takes place when communities take the lead on countering the ideology of terrorism and then law enforcement is called in when a crime is committed or needs to be investigated.

Both communities and law enforcement conclude that they cannot win against terrorism by themselves but need each other. Communities are not extensions of law enforcement and government is not an extension of theologians.

The political disparagement of America’s Muslims undercuts our country’s healthy co-operation within local communities. ISIS is bent on preying upon lost and troubled souls by insidious social-media messaging to scattered alienated people in our homeland, aiming to terrorize the American public. Some voices in the political arena are only serving the terrorists’ purposes by promoting division.

We must fight the stigmatization of any community, the kind of alienation that is rampant in Europe today. Inclusion, integration, civic engagement and partnership create a more collaborative environment.

Fostering dialogue between law enforcement agencies and communities builds mutual trust and understanding — two critical components in creating an atmosphere that addresses differences. When we declare that ISIS cannot and will not influence us by terrorizing and dividing us, we all get closer to rendering terrorists irrelevant.

Want more stories about faith? Follow Acts of Faith on Twitter or sign up for our newsletter.