A student at the University of Massachusetts (UMass) - Dartmouth was sentenced to six years in prison for obstructing justice in the 2013 bombings at the Boston Marathon.

Dias Kadyrbayev, 21, received his sentence Tuesday at a hearing after last year pleading guilty to obstruction of justice and conspiracy, the Associated Press reported. Three days after the bombing on April 15, 2013, Kadyrbayev and Dzhokhar Tsarnaev exchanged text messages in which the former offered his dorm room and anything within it the latter might need to evade police.

In the courtroom Tuesday, the AP noted, Kadyrbayev apologized to the bombing victims for not notifying the police that Tsarnaev had contacted him. By April 18, 2013, prosecutors contended Kadyrbayev knew the Tsarnaev brothers were suspects in the bombing.

That night, Kadyrbayev and two others went to Tsarnaev's room and disposed of his backpack and computer. "I can't find an answer. I really can't believe that I acted so stupidly," he told Judge Douglas Woodlock before receiving his sentence.

Reuters quoted Woodlock called Kadyrbayev's crimes "as serious an obstruction offense as I can find, or as I suppose I can hypothesize." The defense claimed their client and his friends did not immediately accept that Tsarnaev could be responsible for the bombings.

Dzhokhar and Tamerlan Tsarnaev killed three people at the 2013 Boston Marathon and injured 264 more, many of whom needed limbs removed and other surgeries. Tamerlan was killed in a shootout with police hours after Dzhokhar shot and killed MIT officer Sean Collier.

On May 15, 2015, a month after being found guilty on all 30 counts he was charged with, Dzhokhar Tsarnaev was sentenced to death by lethal injection.

Kadyrbayev has already spent 26 months in detention and that will count toward his six-year sentence, the AP noted. After he is released, he will be deported to his him country of Kazakhstan.