A lawyer for a young man accused of lying to the FBI about visiting the surviving Boston Marathon bombing suspect’s dorm room following the blast got prosecutors to agree on Monday to home confinement pending trial.

The parties explained the deal in a joint motion filed several hours before a District of Massachusetts detention hearing for Robel Phillipos. He is charged with making false statements in a terrorism investigation and faces up to eight years in prison plus a $250,000 fine.

Phillipos’s lawyer is Derege Demissie of Demissie & Church of Cambridge, Mass. Assistant U.S. Attorney John Capin appeared for the government.

During a 15-minute hearing, U.S. Magistrate Judge Marianne Bowler agreed to house arrest for Phillipos under his mother’s supervision. Bowler noted that his mother has many friends and is respected in the community but that many of the people who filed affidavits in his support had little recent contact with the defendant.

The joint motion said that since Phillipos’ initial appearance, "the parties have conferred extensively and now agree that the Court can fashion strict conditions of release that will reasonably assure the defendant’s appearance at future proceedings." Phillipos will have to wear an electronic monitoring ankle bracelet.

"I thank the government for working over the weekend to craft these conditions," Demissie said.

Bowler set the probable cause hearing for May 17.

Demissie and his partner Susan Church had moved quickly following Phillipos’ detention and May 1 initial appearance. Amid intense scrutiny about anything connected to the April 15 bombing, which killed three people and wounded more than 200, they collected 14 affidavits from their client’s supporters.

The government has alleged that Phillipos initially lied about visiting Dzhokhar Tsarnaev’s room at the University of Massachusetts at Dartmouth on April 18. The visit came three days after the bombing, on the night authorities released photos of two suspects and asked the public to identify them. The suspects were later identified as Dzhokhar, 19, and his brother Tamerlan Tsarnaev, 26, who died during an April 19 shootout with police.

Demissie, an Ethiopian immigrant who also represents marathon runners through his Apex Athletics Agency, tapped into community ties. Phillipos’s mother, Genet Bekele, described herself in court papers as a person of Ethiopian descent.

During a brief press conference following the hearing, Demissie said he was "pleased with the court’s outcome today."

Church insisted that Phillipos had no prior knowledge of the Marathon bombings. "He’s very well liked and respected by his community," she said, adding that his middle school principal, family and friends attended the hearing.

Dias Kadyrbayev and Azamat Tazhayakov, also friends of Dzhokhar, were being held on conspiracy to obstruct justice charges. Prosecutors say they removed a laptop computer and a backpack that contained fireworks from Tsarnaev’s dorm room and later threw the items in the trash. Each faces up to five years in prison and $250,000 in fines.

Sheri Qualters can be contacted at squalters@alm.com.