Three men charged with federal crimes for allegedly helping Boston Marathon bombing suspect Dzhokhar Tsarnaev appeared during two brief Boston federal court hearings on Wednesday afternoon.

The men facing the new charges knew Tsarnaev from the University of Massachusetts at Dartmouth. They appeared before Magistrate Judge Marianne Bowler, dressed in jeans and casual shirts and shackled at both the ankles and wrists.

Prosecutors said Dias Kadyrbayev and Azamat Tazhayakov intentionally obstructed the law enforcement investigation of the bombing. Each was charged with conspiracy.

FBI agent Scott Cieplik said in an affidavit that there is evidence Kadyrbayev and Tazhayakov knowingly tried to conceal items—namely, a laptop computer and a backpack that contained fireworks—that belonged to the surviving Tsarnaev brother.

In a separate complaint, the authorities charged a third friend, Robel Phillipos, with making a false statement. Investigators said he initially lied about visiting Tsarnaev’s room on the night of April 18, three days after the bombing.

Tsarnaev, 19, is charged in the April 15 attacks that killed three people and injured more than 260. He’s accused of acting with his brother Tamerlan, 26, who died on April 19 in a shoot-out with police.

During Kadyrbayev’s and Tazhayakov’s joint hearing, each agreed to accept voluntary detention pending a May 14 probable cause hearing. They each face up to five years in prison, three years of supervised release, up to $250,000 in fines and a $100 special assessment.

Kadyrbayev and Tazhayakov, nationals of Kazakhstan who were in the United States on student visas, shared an apartment in New Bedford, Mass. They both were arrested on April 20 for alleged immigration violations, Cieplik said.

Prosecutor Stephanie Siegmann said the government was seeking their detention "on the grounds that they pose a serious risk of flight." She noted that they both face removal proceedings.

Robert Stahl, an attorney in Westfield, N.J. who represents Kadyrbayev, said, "We do contest those [immigration removal proceedings]. We’re not conceding there are grounds for removal or deportation from the country."

Phillipos faces up to eight years in prison, three years of supervised release, a $250,000 fine and a $100 special assessment. During his separate hearing, Bowler told him, "I suggest you pay attention to me rather than looking down."

Phillipos’s attorney, Derege Demissie of Demissie& Church in Cambridge, Mass., said, "We waive the detention hearing today and ask for an expedited hearing."

Bowler set Phillipos’s detention and probable cause hearing for next Monday.

"He made a misrepresentation,"Demissie said of his clientduring a brief interview outside the courtroom.

Later, during a press conference outside the courthouse, Stahl said that Kadyrbayev "absolutely denies the charges." His client assisted the FBI and "he’s just as shocked and horrified" about Tsarnaev’s involvement in the bombing as the rest of Boston."He did not have anything to do with it," Stahl said.

He also said Kadyrbayev did not know the items he’s accused of removing from Tsarnaev’s dorm room were involved in a bombing.

Tazhayakov’s lawyer—Harlan Protass of Clayman & Rosenberg in New York—said that his client "feels horror" and "was shocked to hear that someone he knew" was involved in the bombing."He’s cooperating fully and looks forward to the truth coming out in this case. He feels honored to study in the U.S."

Kadyrbayev, Tazhayakov and Phillipos, a U.S. citizen, began attending the university at the same time in 2011, according to charging documents.Kadyrbayev told investigators that Tsarnaev was living in a college dormitory at the time of the bombing. Investigators executed a search warrant at his dorm room on April 20, seizing "a large pyrotechnic and a black jacket and white hat."

FBI agents said Kadyrbayev and Tazhayakov agreed to remove a backpack from Tsarnaev’s room after "concluding from news reports that Tsarnaev was one of the Boston Marathon bombers."

On the night of April 18, amid news reports that displayed Tsarnaev’s photo, Kadyrbayev sent a text message to Tsarnaev, telling him he looked like the person the authorities had identified as a suspect in the bombing, according to the affadavit. Tsarnaev replied: "lol"—shorthand for "laugh out loud."

In Tsarnaev’s dorm, Kadyrbayev removed a backpack containing fireworks that had been opened and emptied of powderto help Tsarnaev "avoid trouble," as FBI agents put it.

"He decided to take Tsarnaev’s laptop as well because he did not want Tsarnaev’s roommate to think he was stealing or behaving suspiciously by just taking the backpack," Cieplik, the FBI agent, said in the affidavit. The authorities said Kadyrbayev threw Tsarnaev’s backpack in a trash bag and discarded it in a dumpster.

Agents said Phillipos "eventually confessed" that he provided false information during previous interviews.

Law enforcement officials found Tsarnaev’s backpack on April 26 in a landfill in New Bedford, Mass. Agents said they discovered fireworks and a homework assignment sheet in the backpack.

Sheri Qualters can be contacted at squalters@alm.com. Michael Scarcella can be reached at mscarcella@alm.com.