When members of the Bayside Shul gathered for Passover last month, it was behind the locked doors of the synagogue, an armed security guard patrolling its parking lot.

And when Milwaukee-area Muslims kneel in prayer for the start of Ramadan on Sunday, many local mosques will be taking those same precautions.

Seven years after a white supremacist killed six worshipers at the Sikh Temple of Wisconsin — after Charleston and Pittsburgh, Christchurch, Sri Lanka and now Poway — faith leaders are increasingly hardening their buildings against potential attacks.

Many are hiring off-duty police officers or armed security guards for services and special events. They are locking doors, installing cameras, taking active-shooter training and in some cases tacitly allowing the carrying of concealed weapons during services.

These are necessary precautions, they say. But they worry that they cut at the very heart of their faith traditions, which call on them to welcome the stranger, to open their doors as places of prayer and refuge.

"It is really disheartening," said Othman Atta of the Islamic Society of Milwaukee, which operates three mosques in Milwaukee and Brookfield.

"You don't want to be a fortress, where you're turning people away or creating a separation. But you don't want to be sitting targets either," he said. "This is something all religious institutions are really struggling with."

RELATED:Daughter of the rabbi injured in the San Diego synagogue shooting has a connection to the Milwaukee area

RELATED:500 attended a vigil at the Islamic Center of Milwaukee for victims of the New Zealand mosque attacks

RELATED:Delafield police chaplain helps churches statewide prepare for active shooter situations

Last week's shooting at a San Diego-area synagogue was the latest in a series of deadly attacks on houses of worship in the United States and abroad in recent years. Last fall, 11 people were killed when a gunman opened fire at the Tree of Life synagogue in Pittsburgh. This year, 50 people died when a white supremacist attacked mosques during Friday prayers in Christchurch, New Zealand. And more than 200 were killed in the Easter Sunday bombings of Catholic churches by Islamic militants in Sri Lanka.

At the same time, the FBI and other organizations have documented an increase in hate crimes, including those based on race and religion, and spikes in anti-Muslim and anti-Semitic incidents. In the most recent FBI report, hate crimes committed on the basis of religious identity jumped 23%, the biggest annual increase since 2001.

Many Milwaukee-area houses of worship began seriously evaluating their security after the Sikh Temple shooting in 2012, with the help of local and federal authorities. And they have added security measures over the years, driven at times by the most recent attack.

James Davis, an elder at New Testament Church in Milwaukee, said his church began hiring an armed security guard in 2015 after white supremacist Dylann Roof murdered nine people during a Bible study at an African American church in Charleston, South Carolina.

After Pittsburgh, Congregation Emanu-El B'Ne Jeshurun in River Hills, which had been securing its doors for a while, hired a full-time director of security — a first for a Milwaukee-area synagogue. And the Bayside Shul beefed up its security, locking doors at all times, installing new security cameras inside and out, and hiring armed security for services and events.

Some Milwaukee-area mosques have been using armed security guards for a while, but interest has increased over the last year, according to Atta.

"There's definitely a sadness that this had to happen," Rabbi Cheski Edelman said of the heightened measures at the Bayside Shul. "But people understand that this is the reality ... and that it's the best way to protect the community."

Some congregations have begun drafting their own members to assist in security, whether that's greeting newcomers at the door or patrolling their parking lots, with an eye toward spotting anyone who looks unfamiliar or out of place.

And some are turning a blind eye to the "no-weapons" signs they posted after Wisconsin passed its concealed carry law in 2011, believing that congregants who are trained and licensed to carry firearms could save lives in the minutes it takes for police to respond to an attack.

"It's kind of a don't-ask-don't-tell policy," said Noman Hussain, the imam at the Islamic Society's Masjid Al-Noor mosque in Brookfield, which has used an off-duty Waukesha County sheriff's deputy for security for about two years.

"But we're going to highly recommend that anyone who wants to carry makes sure they have multiple hours of training, so they don't do more harm than good," he said. "For now, we're not officially allowing guns. But if someone does and we don't know about it ..."

At New Testament, where several members work in law enforcement or other jobs in which they're licensed to carry firearms, church leaders are taking a more direct approach.

According to Davis, the church is developing a security "ministry" that would sanction the carrying of concealed firearms by certain qualified members. And it would revamp its "no-weapons" signage to make it clear that some members "have the permission of the board of elders to carry a concealed weapon."

"We want to do as much as we can to let folks know that this may be the wrong building to go after," said Davis.

Many faith leaders blame the increase in hate crimes on the rise of President Donald Trump, whose anti-immigrant and anti-Muslim rhetoric, they believe, has emboldened extremists, and the power of social media to amplify their views and inspire copycats.

"We live in a much more polarized society right now. And that's part of the problem," said Atta. "I think it's empowering more people to think they have free rein to say and do what they want to do."

There is a long history in African American churches of some members carrying firearms because of racist attacks, according to the Rev. Walter Lanier, pastor of Progressive Baptist Church on Milwaukee's northwest side. Still, he said, it is seen by some as a lack of faith that God will protect them.

Edelman, of the Bayside Shul, does not share that view.

"The Jewish tradition is pretty clear that we are partners with God. We have to do our part, and God will do His part," he said.

To illustrate, he shared the biblical story of Jacob's meeting with his brother, Esau, after two decades estranged.

"When Jacob was going to confront his brother, it says he prayed, but he also prepared for war," said Edelman. "He did both."

Contact Annysa Johnson at anjohnson@jrn.com or 414-224-2061. Follow her on Twitter at @JSEdbeat. And join the Journal Sentinel conversation about education issues at www.facebook.com/groups/WisconsinEducation.