A college friend of Boston Marathon bomber Dzhokhar Tsarnaev has been sentenced to six years in prison for impeding the investigation into the 2013 attacks.

Dias Kadyrbayev apologised to the victims of the attacks and their families, saying he is ashamed he did not call police when he recognised photos of Tsarnaev as a suspect.

He pleaded guilty last year to obstruction of justice and conspiracy charges for removing items from Tsarnaev's dorm room after recognising his friend in photos released by the FBI days after the bombing.

Kadyrbayev told the judge today: "I really can't believe that I acted so stupidly."

Three people were killed and more than 260 injured in the 2013 bombing. Tsarnaev has been sentenced to death for the attacks.

Prosecutors said Kadyrbayev exchanged text messages with Tsarnaev, then went to his room with two other friends.

There, he and another man agreed to remove Tsarnaev's computer and a rucksack containing fireworks that had been partially emptied of their explosive powder.

Kadyrbayev also threw the backpack into a skip. He said today he had no explanation for his actions.

"I can't find an answer," he told Judge Douglas Woodlock.

In sentencing memos filed in court, prosecutors said Kadyrbayev had the power to help law enforcement identify Tsarnaev and prevent additional violence.

They said that possibly included the murder of Massachusetts Institute of Technology police Officer Sean Collier, who was killed by the Tsarnaev brothers as they tried to flee after the FBI released their photos. Dzhokhar's older brother, Tamerlan, died after a shootout with police.

"Hours before (Dzhokhar) Tsarnaev murdered Officer Collier, the defendant recognised that his friend Tsarnaev was the fugitive bomber," prosecutors wrote.

"Any reasonable, decent person possessed of the information the defendant had would have recognised that immediate apprehension of Tsarnaev was a public-safety imperative."

Kadyrbayev will get credit for the 26 months he has already been in custody.

Kadyrbayev, 21, will be deported to his native Kazakhstan when his prison term is up.

Mr Collier's sister had been expected to speak but at the beginning of the hearing, prosecutors informed the judge that she had decided not to.

A prosecutor quoted from a letter written by his stepfather in which the family said they believe that if Kadyrbayev had reported Tsarnaev's identity to authorities, he could possibly have prevented Mr Collier's death.

Kadyrbayev's father, Murat, travelled from Kazakhstan to attend the sentencing hearing. He said his son did not fully understand in the moment how serious his actions were.

"Had he known what he was doing and had he understood what he was doing, we wouldn't be standing here," Murat Kadyrbayev said through a translator outside court.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.