A federal judge has quoted Antony in William Shakespeare's Julius Caesar as he formally sentenced Boston Marathon bomber to death for the 2013 terror attacks.

Judge George O'Toole Jr. said: "One of Shakespeare's characters observes, 'The evil that men do lives after them. The good is often interred with their bones.'

He added: "So it will be for Dzhokhar Tsarnaev."

Pronouncing the sentence on 23 June in Boston Judge O'Toole said he was required under law to impose the jury's death sentence for the 15 April 2013 attack that killed three people and wounded more than 260 others.

"As long as your name is mentioned, what will be remembered is the evil you've done,"Judge O'Toole told Tsarnaev before sentencing him to death by lethal injection. "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."

Tsarnaev, 21, looked down and rubbed his hands together as the judge sentenced him.

The bomber apologised, saying: "I am sorry for the lives I have taken, for the suffering that I have caused you, for the damage I have done, irreparable damage. In case there is any doubt, I am guilty of this attack, along with my brother."

A Texas woman who lost a leg in the bombing gave a defiant speech in which she pointedly told Tsarnaev that she is not his victim.

Rebekah Gregory was the last person to address Tsarnaev at his sentencing hearing, and looking directly at him, she said: "While your intention was to destroy America, what you have really accomplished is actually quite the opposite — you've unified us."

She says: "We are Boston Strong, we are America Strong, and choosing to mess with us was a terrible idea."

She then says to Tsarnaev: "So how's that for your VICTIM impact statement?"

An appeal is automatic in death penalty cases.

Meanwhile, Boston Police have arrested a man after removing a butcher's knife from his car outside the court. The car was in a restricted area about 75 feet from the court.

Officers removed what appeared to be a large butcher's knife from the man's car.