BOSTON — Four glowing white pillar candles illuminated photographs of each of the people lost in bombing-connected violence in the Boston area last week as the city held religious services on the first Sunday after the blasts shattered the community and plunged it into days of chaos.

The photographs showing the faces of 8-year-old Martin Richard, 23-year-old Lu Lingzi, 29-year-old Krystle Campbell and 26-year-old Sean Collier, a police officer at the Massachusetts Institute of Technology, were propped up on the altar at Boston’s Cathedral of the Holy Cross, where Roman Catholic Cardinal Sean Patrick O’Malley spoke about the city’s pain and looked ahead to its spiritual recovery.

“Everyone has been profoundly affected by this wanton violence and destruction inflicted upon our community by two young men unknown to all of us. It’s very difficult to understand what was going on in their heads, what demons were operating, what ideologies or politics or the perversions of their religion,” he said.

“Our task is to keep this spirit of community alive going forward,” he said. “We must be people of reconciliation, not revenge. The crimes of two young men must not be the justification for prejudice against Muslims or against immigrants. “

Two Muslim brothers from Russia, 19-year-old Dzhokhar Tsarnaev and his 26-year-old brother, Tamerlan, are suspected in Monday’s bombings. Their motive remains unclear. The older brother was killed during a getaway attempt; the younger brother was captured Friday night after a gunfight with police and remains in a hospital.

The cardinal said the violent culture of video games and films has made Americans insensitive to suffering. He criticized Congress for failing to enact gun control legislation and cited abortion as evidence of this insensitivity.

The service at the cathedral also honored police, firefighters, EMTs and doctors who saved lives.

A Boston synagogue, Temple Israel, opened its doors to worshippers from Trinity Episcopal Church, which sits in the shadow of the marathon finish line and remains closed.

An interfaith service was also held Sunday near the finish line, where the bombs went off.