They found friends, coaches, mentors. Dzhokhor even won a scholarship from the city.

And then it all shattered on Friday.

As images of the brothers flashed across the news and ­armored vehicles rolled down Norfolk Street, Cambridge was horrified to realize that the young men it had welcomed had been accused of the deadly Boston Marathon bombings and the killing of an MIT officer on Thursday.

The city that has its own Peace Commission, that was the first to issue marriage ­licenses to same-sex couples in 2004, and that declared itself a “sanctuary city” for illegal ­immigrants back in 1985 was struggling with a blow to its identity as a bastion of openness and harmony. Perhaps more than anywhere else, people here were grasping for ­answers.

“This is a progressive town, the People’s Republic, and how could this be in our midst?” said Larry Aaronson, a longtime Rindge and Latin teacher who knew Dzhokhor and who lives three doors down from the brothers on Norfolk Street. “I’m at a loss. I’m at a total and complete loss.”

Former classmates, teachers, and friends who knew the brothers said there was little to suggest anything was wrong with them.

Tamerlan, 26, who was killed after a shootout with ­police Thursday, graduated from Rindge and Latin in 2006, Aaronson said, and attended Bunker Hill Community College.

Dzhokhor, 19, was caught Friday night. He attended the Community Charter School of Cambridge in Kendall Square, graduated from Rindge and Latin in 2011, and was a student at the University of Massachusetts Dartmouth. Friends described the floppy-haired teen as an easygoing “stoner” who excelled at wrestling and who liked to smoke marijuana behind the pool at Magazine Beach, on the Charles River.

“He was just a normal guy, very chillaxed, and very laid back,” said Ashraful Rahman, a Rindge and Latin senior and friend of Dzhokhor.

The two wrestled together, worshiped together at the ­Islamic Society of Boston, and hung out in Dana Park after school, he said.

“We just chilled out, man, just average teenagers,” said Rahman. “He never stated that he was against the government or for anarchy or anything.”

Dzhokhor, he said, mentored him on the wrestling team. “I looked up to Dzhokhor because he won state his second year,” Rahman said. “Seeing this, it’s like seeing one of your heroes and finding a flaw in one of them.”

Peter Payack, the assistant wrestling coach at Rindge and Latin, said Dzhokhor wrestled on the team for three years and was captain for two years and a Greater Boston League all-star. Just this February, Dzhokhor came back to wrestle with the team, Payack said.

“He was a dedicated kid, and all the kids loved him,” he said. “We only name captains who are good, but who also gain respect from his fellow wrestlers. He had to be a leader, and he had all those qualities. He was one of my guys.”

Payack said he has coached students who have gotten into trouble with police over the years, but never saw an inclination toward violence in Dzhokor.

“He seemed like one of the most well-adjusted kids on the team,” Payack said. “He seemed like he didn’t have any problems.”

In a high school with students from many different ethnic backgrounds, “he got along with all the different groups on the team,” Payack said.

“He never talked about ­being a Muslim,” he said. “We’re in Cambridge. We have a completely diverse team, so nobody talked about religion. He was just one of us.”

Payack, who has run the Marathon 24 times and often wears his blue-and-yellow Marathon jacket around ­Cambridge, said he was saddened that Dzhokhor has been accused of targeting a race that he knew his coach loved.

“It was like a bomb going off in my heart this morning,” ­Payack said.

Tian Saems, 21, a friend of Dzhokhor’s from Rindge and Latin, said her friend often ­remarked that he was “really thankful for the opportunities” he had in this country.

“We just want everyone to know that he was a good kid and something must have happened in the last year,” she said.

City leaders said they expected there would have to be some soul-searching in the days ahead.

“That we have a relationship to the people who perpetrated this, it does cause one pause, because we all truly believe we are the best community we could be,” Councilor Kenneth E. Reeves said.

“I would almost think the Cambridge experience couldn’t incubate a terrorist because that’s how oriented toward peace and community this city believes itself to be.”

Brian Ballou and Rebecca ­Ostriker of the Globe staff and Globe correspondent Todd Feathers contributed to this ­report. Levenson can be reached at mlevenson@globe.com.

BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. After the free trial period, your free BostonGlobe.com digital access will stop immediately unless you sign up for BostonGlobe.com digital subscription. Current print and digital subscribers are not eligible for the free trial.

Thanks & Welcome to Globe.com

You now have unlimited access for the next two weeks.

BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. After the free trial period, your free BostonGlobe.com digital access will stop immediately unless you sign up for BostonGlobe.com digital subscription. Current print and digital subscribers are not eligible for the free trial.