Breaking his long silence Wednesday, the 21-year-old man convicted of the Boston Marathon bombings acknowledged his guilt, apologized to his victims and stood to hear a judge formally impose a penalty of death by execution.

“I’d like to now apologize to the victims and the survivors,” said Dzhokhar Tsarnaev, speaking softly for five minutes.

“I am sorry for the lives I have taken and suffering I have caused you and the damage I have done.”

Tsarnaev and his older brother set off twin blasts on April 15, 2013, near the crowded finish line of the race, killing three people, injuring more than 260 and traumatizing the city.

Until now, the only public words Tsarnaev had uttered were “not guilty” at his arraignment, and the only insight into his thinking was a note scrawled in the boat where he hid while police closed in. It spoke of the U.S. government “killing our ­innocent civilians” and said how, as a Muslim, “I can’t stand to see such evil go unpunished.”

There were no political statements Wednesday or hints of the smirking defiance that sometimes marked his earlier appearances in court.

Instead, Tsarnaev, an ethnic Chechen and naturalized U.S. citizen, said he would “like to begin in the name of Allah,” noting how it was the “blessed month of Ramadan.” And he went on to offer a measure of contrition.

“Immediately after the bombing, which I am guilty of, let there be no doubt about that . . . I learned about some of the victims,” he said. “I learned their names, their faces, their ages. . . . And they had hearts and souls.”

He also thanked the jurors, who last month voted unanimously for death, for their service.

After the hearing, Carmen Ortiz, the U.S. attorney for the District of Massachusetts, lambasted Tsarnaev for trying to cloak his apology in “a peaceful and loving religion.”

“He didn’t renounce terrorism. He didn’t renounce violent extremism,” Ortiz said at a news conference outside the courtroom. “And he couched his comments in line with Allah, and Allah’s views . . . and there was nothing about this crime that was Islam-associated.”

How the prosecutors argued for the death penalty

Tsarnaev’s defense team had not contested his guilt at trial and instead focused its efforts on shifting the greater responsibility onto the older brother in the hope of obtaining a life sentence.

Tamerlan Tsarnaev was killed in a chaotic shootout with police in Watertown, Mass., and was also run over by a car driven by the fleeing Dzhokhar.

Some of Tsarnaev’s family had insisted on the brothers’ innocence and spoke of an American conspiracy to convict the younger one, making his admission all the more significant.

Nothing Tsarnaev said could have swayed the judge from imposing death, as he was bound under federal statute to follow the jury’s recommendation.

Tsarnaev spoke in a courtroom crowded with people who, earlier in the day, had addressed him directly and called him a leech, a coward and a liar.

The parents of Krystal Campbell, 29, who was killed in the bombing, spoke briefly. Her mother, Patricia, told Tsarnaev that the choices he made were “despicable” and that “what you did was disgusting.”

“I think the jury did the right thing,” she said. Thirteen of the 18 jurors on the panel were in the courtroom Wednesday.

Tsarnaev was also charged with killing Sean Collier, 27, a police officer for the Massachusetts Institute of Technology, in the aftermath of the attack. Collier’s stepsister Jennifer Rogers had sharp words for the killer, saying he had shown no remorse as he swaggered into court thinking it was a party.

“He’s a coward and a liar,” she said. “He showed no remorse. He has not once shown that he cares about a single person but himself. He is a leech.”

William and Denise Richard, parents of 8-year-old Martin Richard, who was killed in the blast, also a made a statement.

“He chose hate,” the statement said. “He chose destruction. He chose death. This is all on him. We choose love. We choose kindness. We choose peace. This is our response to hate. That’s what makes us different from him.”

They said they had hoped he would spend the rest of life in prison instead of receiving the death sentence, but “on the day he meets his maker, may he understand what he’s done, and may justice and peace be

Victims, some in tears, described what they endured after the bombings. They detailed the many sleepless nights, post-traumatic stress, lost income, nightmares, panic attacks, guilt, depression and flashbacks.

“Our injuries are not disappearing,” said Scott Weisberg, a family doctor from Birmingham, Ala., who crossed the finish line seconds before the first bomb detonated.

U.S. District Judge George A. O’Toole Jr., who formally imposed the sentence of death, said: “Whenever your name is mentioned, what will be remembered is the evil you have done.

“What will be remembered is that you murdered and maimed innocent people, and that you did it willfully and intentionally. You did it on purpose. . . . You had to forget your own humanity.”

He said that Tsarnaev had succumbed to the “diabolical siren song” of al-Qaeda propagandists.

Tsarnaev will become the 62nd inmate on federal death row, according to the Death Penalty Information Center.

He will be taken to a cell in Terre Haute, Ind., where he will remain during an appeals process that probably will stretch on for years.

Said O’Toole, quoting from Shakespeare’s “Julius Caesar”: “ ‘The evil that men do lives after them. The good is oft interred with their bones.’ So it will be for Dzhokhar Tsarnaev.”

Berman reported from Washington.