By Elizabeth Barber and Scott Malone

BOSTON (Reuters) - A friend of the Boston Marathon bomber apologized on Tuesday, before being sentenced to six years in prison for obstruction of justice, for not calling the police when he realized his friend Dzhokhar Tsarnaev was a suspect in the deadly attack.

Kazakhstan national Dias Kadyrbayev, 21, was one of three friends of Tsarnaev's to face federal charges for removing a backpack containing fireworks from the bomber's college dorm three days after the April 15, 2013, bombing, as the FBI searched for Tsarnaev and his older brother.

"I want to start by saying how truly sorry I am for all the victims, their families, their friends," Kadyrbayev told the court. "I am ashamed by my actions. I know my bad decision put shame on my name."

Prosecutors, who had asked for a seven-year sentence, noted that Tsarnaev and his older brother had shot dead a police officer around the time of the dorm visit. They contended the death could have been averted if Kadyrbayev had immediately called the police.

Prosecutors never claimed that Kadyrbayev or his friends had advance knowledge of the bombing, which killed three people injured 264 in one of the highest-profile attacks on U.S. soil since Sept. 11, 2001.

"This is as serious an obstruction offense as I can find, or as I suppose I can hypothesize," said U.S. District Judge Douglas Woodlock.

Tsarnaev, 21, was found guilty and sentenced to death by lethal injection for the bombing. He was also found guilty of shooting dead Massachusetts Institute of Technology police officer Sean Collier.

Kadyrbayev's lawyers rejected the claim that their client was responsible for Collier's death, noting that several friends of Tsarnaev's who testified during his trial said they had difficulty believing Tsarnaev was the bomber.

Fellow Kazakh exchange student Azamat Tazhayakov, who was found guilty by a jury of the same charges to which Kadyrbayev pleaded guilty, and Robel Phillipos of Cambridge, Massachusetts, who was convicted of the lesser charge of lying to investigators, are due to be sentenced on Friday.

Tsarnaev's 26-year-old brother, Tamerlan, died following a gunfight with police in the chaotic hours after Collier's shooting.

Kadyrbayev's father, Murat Kadyrbayev, after the sentencing called Woodlock a "wise man" and said his son had "grown up" since the days after the bombing.

"We all are responsible for each other and the whole family takes responsibility for Dias," the elder Kadyrbayev said.

(Editing by Bernadette Baum)