– Sept. 11, 2001, ruptured 13-year-old Hamza Syed's world. Being Muslim instantly became the only part of his identity that seemed to matter; kids at his school in Lynn besieged him with questions he could not answer. He had immigrated to the United States from Pakistan at age 3, but he no longer felt allowed to call himself American.

A year ago, after the Boston Marathon bombings, Syed braced himself for another anti-­Muslim backlash. It never happened.

"I grew up being an outsider, feeling like an outsider, and there wasn't any moment really after the Boston Marathon where I had that feeling of ­being an outsider again," he said. "I grieved with everyone. … I could understand their feelings, and they could understand mine, without there being an asterisk next to it."

On Monday, Syed expects to run the Boston Marathon for the first time, an act he sees as an expression of his love for his resilient city and for its ­embrace of diversity.

There were isolated displays of Islamophobia in the aftermath of the marathon bombings. A woman wearing a hijab was assaulted on a street in Malden. Strangers sent hateful e-mails to Boston's mosques. Some Muslims feared being questioned by law enforcement or seethed over a tabloid's portrayal of an innocent teenager and his 26-year-old friend as suspects.

But the broader tableau showed a city that has become more welcoming of Muslims in the years since the 2001 ­attacks, many local Muslims said. The scale of the two tragedies was very different, but many Muslims said interfaith cooperation and increasingly diverse schools and workplaces contributed to a change in tone. It also seemed, they said, that their non-Muslim neighbors had grown less fearful in a dozen years of discussing terrorism, war, national security, and religious liberty.

"Now, when an act of terror occurs, people can see it for what it is: someone exploiting religion, someone with serious issues," said Jalon Fowler, a 38-year-old Muslim who ran in last year's marathon and will compete again this year.

After the marathon bombings, many Muslims said they felt reassured by gestures of support and concern from friends and co-workers, from ­local politicians and clergy of other faiths. Bostonians, they said, seemed to understand that most Muslims were as horrified at the violence on ­Boylston Street as everyone else was.

'Incredibly sincere people'

"There is never a silver lining to mass murder," said Imam William Suhaib Webb, spiritual leader of the Islamic Society of Boston Cultural Center in Roxbury. "But what we learned is, this is a really great city with incredibly sincere people.

"It was like, we're together, we all anguish about what happened, and we are going to try to speak to the problem together."

The Boston area's two most prominent mosques were inundated with press calls and television cameras after the bombings, especially the Islamic Society of Boston in ­Cambridge, where suspects ­Tamerlan and Dzhokhar Tsarnaev occasionally worshiped.

Ismail Fenni, acting imam of the Cambridge mosque, tried to field questions and to respond to the stunned congregation, few of whom had known the Tsarnaevs.

"We were worried the name and the reputation of the mosque would be stained," Fenni said.

Those fears eased as neighbors lent support in calls and ­e-mails. A couple of weeks after the tragedy, the mayor of ­Cambridge and other officials led a peace walk from City Hall to the mosque.

A series of important ­moments in interfaith relations in Boston followed. The Friday after the manhunt in Watertown, Rabbis Ronne Friedman and Jeremy Morrison of Temple Israel and the Rev. Burns Stanfield, president of the Greater Boston Interfaith Organization, offered prayers and words of solidarity at the Roxbury mosque's midday prayer service.

In January, Webb made history by preaching at Temple Israel's annual Shabbat service honoring the Rev. Martin ­Luther King Jr., becoming the first imam to formally address the city's largest synagogue. Nearly 1,000 Jews, Christians, and Muslims lingered long after­ward to eat, chat, and even join in a little traditional Israeli dancing.

Nancy Khalil, a doctoral candidate in social anthropology at Harvard and a former Islamic Cultural Center leader, marveled at the warmth.

"It was an unbelievable moment for me, and it was really indicative of the type of relationships that we now have across institutions and across communities," Khalil said. "Because it wasn't just the leaders being welcoming. … It was everybody in that temple being welcoming."

The Boston Marathon was always part of Syed's life growing up. But Syed, 26, who works at Oracle Corp., never imagined running until after the bombings.

"It's a part of the tradition of your city," he said. "You look forward to it every single year. And you understand how jubilant an event it is. And that was taken away."

But what wasn't taken away after the tragedy was his sense of belonging.

The day after the bombings, Syed put on a hoodie and went for his first training run along the Charles River. Along the path were messages scrawled in chalk: Live with no fear. Stay strong.

"Not to be corny, but I kind of felt like there was a city behind me," said Syed.