As American Muslims mourned the 49 worshipers killed in attacks on two New Zealand mosques, new ripples of fear echoed through a community that has long felt unease in the United States.

Wajahat Ali, a prominent Muslim writer, summed up the feelings of many: “Our houses of worship are no longer safe places,” he said.

He had wondered about his friends bowing their heads in prayer at Friday worship and having to keep one eye on the door. He had heard from friends fretting about how to protect their children at what is supposed to be a time of communal prayer for Muslims. “Will we have to pack and carry? Am I supposed to hold my baby in one hand and have my other hand on a pistol in my belt? This is terrifying.”

For a community that has feared for its reputation in America since the 9/11 terrorist attacks, and has watched hate crimes against Muslims mount over the past three years, Friday’s violence ratcheted up anxiety levels that were already high. Mosques across the country swiftly implemented new security precautions, just hours before their communities gathered for the weekly jum’a prayer. Police in cities across the country sent officers to mosques. Faithful attendees debated whether it would be safe to go pray. Christians and Jews arrived at services, pledging to support and protect their neighbors.

In the Queens neighborhood of Richmond Hill, Bano Ngafook said some members were too afraid to come to the service at Masjid Al Abidin mosque. Syad Hydarali, a trustee of the mosque, said members in this community, many of whom are Caribbean immigrants, are fearful even of law enforcement because of the New York City Police Department’s troubled history of surveilling Muslims. “You pray to God you have some measures in place to mitigate violence, but people are scared; they’re heartbroken,” he said.

In Minneapolis, Abdulrahman Hashi, 60, prepared to preach at Dar al-Hijrah mosque about the danger of extremist violence even after learning that his stepbrother, Adan Ibrahin Dirie, had been injured in the attack and his stepbrother’s son had been killed. He said grief would not stop him from leading prayers for his community, which includes many Somali immigrants. “We are still doing our worshiping, and we’re not stopping that,” he said.

At Masjid Muhammad in Washington, more than 300 sock-footed worshipers packed in for prayer, along with city leaders. Staff and members worked hard to create a feeling of calm: a small girl walked around hugging visitors, Girl Scouts sold cookies on the sidewalk, and smiling worshipers greeted people enthusiastically at every doorway. At the end of his sermon, however, Imam Talib Shareef addressed the horror in New Zealand. “Make this prayer as if it were your last. For some [in Christchurch], it was their last jum’a,” said Shareef, who leads the historic and largely African American community.

Muslims make up just under 1 percent of the U.S. population, according to the Pew Research Center — about half the number of Jews in the United States, somewhat less than the number of Mormons, and slightly more than the number of Hindus or Buddhists. Since 9/11, Muslim children have been taunted as “terrorists.” Over the past three years, since President Trump campaigned on a promise to “ban” Muslims from entering the country and then enacted a court-challenged travel ban that bars people from some majority-Muslim countries, many have grown increasingly concerned. By Friday, some said their nerves were so jangled that they feared returning to their mosques.

Ali blamed Trump for shifting the culture, and he said acts of hatred are not just aimed at Muslims — the fatal shooting of 11 worshipers in a Pittsburgh synagogue in October also sprang from the same bias. “There’s a climate of hate that has been nurtured by the president all the way down. We saw it against Jews,” he said. “There’s a cost to this rhetoric of hate. The cost is 49 people who went to Friday prayer.”

The Council on American-Islamic Relations, the largest Muslim advocacy group in the United States, acknowledged the pervasive anxiety on Friday, promoting a booklet on security strategies for mosques. The group decried what it described as an “unprecedented spike in bigotry . . . since the election of Donald Trump as president.” CAIR pointed to a manifesto that New Zealand police say was written by the gunman, who also broadcast some of the violence. The manifesto echoed white-supremacist views and criticized Muslims and immigrants. CAIR noted that it praised Trump as “a symbol of renewed white identity and common purpose.”

Trump denounced the attack in New Zealand on Friday morning on Twitter. Hours later, he was asked whether white nationalists were a growing global threat, and he said he did not think so. They are a small group of people,” he said.

Crimes motivated by bias against a particular religion or ethnicity are notoriously difficult to track. But the FBI’s statistics on religiously motivated hate crimes show a sharp rise in recent years. In 2017, the most recent year for which the FBI has published data, Jews were the most frequently targeted, in 938 incidents. The FBI recorded 273 anti-Muslim crimes in 2017, 307 in 2016 and 257 in 2015, the year Trump’s campaign for president began.

From 2005 through 2014, the decade before Trump’s campaign, the FBI reported 160 anti-Muslim crimes or fewer each year.

Muslim leaders have asked Trump to speak out in the way that President George W. Bush did after the 9/11 attacks and the way President Barack Obama did at a Baltimore-area mosque: explicitly affirming the faith of Islam and the place of Muslims in the American fabric.

Oussama Jammal, secretary general of the U.S. Council of Muslim Organizations, said that the FBI convened a call for Muslim groups to discuss security in light of the New Zealand attacks. But in general, Jammal said, Muslim groups have been in touch with the administration far less under Trump than previous presidents. “We have not spoken to members of his Cabinet or anyone connected with them ever since he took over. We don’t have any direct communication,” he said, adding that one question Muslims face is whether to purchase high-tech surveillance equipment or to try to preserve an atmosphere of sanctuary, away from reminders of threat.

Saif Rahman, a leader at Falls Church’s large Dar al-Hijra Islamic Center, said he worried about striking the right balance when it comes to security at his mosque. “This is a place of worship, and people feel the need to feel they’re coming to a sanctuary and can come and approach God,” he said. “Our security guys wanted to check cars, and I said absolutely not. We want to keep this idea that the mosque is an open place, where people can feel at peace. We don’t want them to feel under siege.”

This story has been updated.