BOSTON — Yusufi Vali was hunched over his computer at this city’s biggest mosque, where he is executive director, when the first phone call came. The police had killed a man a few miles away. Soon there were reports that the man was a Muslim who had been under investigation for terrorism.

And so the news media inquiries began. More than 100 calls came to the mosque over the next few days. Mr. Vali would explain, over and over, that the young man fatally shot after pulling a knife on the police on June 2 had only the slightest connection to the mosque: He had been hired by a security contractor to guard the mosque during the holy month of Ramadan in 2013.

No, he was not a regular at prayers. No, Mr. Vali did not recall meeting him. No, he could not shed light on any reported plan to behead a police officer, except to say that such a thing would be abhorrent.

“It weighs on you,” Mr. Vali, a rail-slender 31-year-old Princeton graduate, said of the fallout from the latest allegations of terrorist plotting in the name of Islam. “I don’t have control over what these people do. It’s frustrating to have it put on us.”