BOSTON — Accused Boston Marathon bomber Dzhokhar Tsarnaev told his friends about martyrdom and bomb-building over lunch before the attacks last year, an FBI agent testified on Friday in the trial of one of the friends for obstruction.

Azamat Tazhayakov is the first of Tsarnaev’s friends to face trial. He is charged with removing evidence from Tsarnaev’s room at the University of Massachusetts Dartmouth and throwing away a backpack containing fireworks casings as the FBI searched for the suspect, accused of killing three people and injuring 264 in the April 2013 bombings.

FBI Special Agent Timothy Quinn said Tazhayakov told him that Tsarnaev had discussed martyrdom and his knowledge of bomb building during a conversation over lunch with Tazhayakov and his roommate and fellow Kazakh exchange student Dias Kadyrbayev before spring break last year.

“Dzhokhar had explained that people who die in an act of martyrdom die with a smile on their face and go straight to heaven,” said Quinn, who interviewed Tazhayakov in the days after the alleged visit to Tsarnaev’s room.

“He also explained that during the same conversation, Dzhokhar said he knew how to build bombs,” Quinn testified.

Tsarnaev was captured in the days after the bombing and is awaiting trial in November on terrorism charges. His older brother Tamerlan, also a suspect in the bombing, was killed following a shootout with police.

FBI agent Farbod Azad had testified on Thursday that Tazhayakov told him in an interview after the bombing that he and Kadyrbayev and a third man, Robel Phillipos of Cambridge, Massachusetts, had removed the backpack and a laptop from Dzhokhar Tsarnaev’s dorm room. Tazhayakov’s attorneys say he never touched the backpack or fireworks, and that it was Kadyrbayev who threw them out.

FBI Special Agent Kenneth Benton testified on Friday he recovered the backpack at a landfill on April 26, 2013. The backpack contained fireworks with the gunpowder removed, a spiral notebook, a jar of Vaseline and a homework assignment from an ethics class in which Tsarnaev was enrolled, he said.

An FBI forensic examiner, David McCollum, testified Vaseline could be used to make an improvised explosive device.

Tazhayakov could face up to 25 years in prison. Kadyrbayev faces the same charges. Phillipos is accused of the lesser charge of lying to investigators.

Tsarnaev’s trial is set for November, on charges that carry the death penalty if he is convicted.