Two Kazakh men associated with the alleged Boston Marathon bombers went before a federal immigration judge this morning on allegations they violated their student visas.

The men were detained for civil immigration violations after authorities questioned them about their possible connection to Tamerlan and Dzhokhar Tsarnaev, who allegedly detonated two bombs at the Boston Marathon last month, killing three people and injuring more than 200. The brothers also allegedly murdered MIT Police Officer Sean Collier.

The two men, Dias Kadyrbayev and Azamat Tazhayakov, came to America from the Central Asian nation to study at the University of Massachusetts at Dartmouth, where Dzhokhar Tsarnaev was also enrolled.

Advertisement - Continue Reading Below

They have not been charged with a crime.

A Department of Homeland Security prosecutor argued that the men had violated their student visas, but defense lawyers argued that Tazhayakov is still enrolled at the college. While Kadyrbayev was expelled from the school because of low grades, the defense argued he should be released and allowed to leave the country. A hearing on Kadyrbayev’s case will be held on May 22.

Lawyers for the men said they had cooperated with Homeland Security and FBI investigators for hours and were only college buddies with Dzhohkar Tsarnaev and should be released.

“We just want to resolve it as quick as possible,” said lawyer Linda Cristello.

The men are being detained in the Suffolk County jail and appeared before Judge Steven F. Day via videoconference, wearing prison scrubs, from the jail. The consul of Kazakhstan, other representatives as well as US government officials were in the court.

Both defense lawyers and the prosecutor asked for the press to be removed from the courtroom but after The Boston Globe objected, Day let reporters stay.

The hearing marks the men’s first court appearance since immigration officials arrested and jailed them 11 days ago in New Bedford.

A UMass Dartmouth official confirmed Kadyrbayev was no longer enrolled in school while Tazhayakov was still attending classes.

Tamerlan Tsarnaev, 26, was killed after a gunfight with police and his brother ran him over with a stolen getaway vehicle. Dzhokhar Tsarnaev, 19, is in custody and has been charged with using a weapon of mass destruction and malicious destruction of property resulting in death.

Kadyrbayev’s lawyer and his father have said separately that the men had nothing to do with the bombings. Tazhayakov’s lawyer did not respond to requests for comment.

The Kazakh men’s visa status remains unclear because federal immigration court files are not available to the public.

UMass Dartmouth, with more than 9,000 students, temporarily closed down and evacuated after the Boston marathon bombings, which killed three people and injured more than 200.

On April 21, investigators found a “large pyrotechnic” in Tsarnaev’s dorm room.

Authorities have also been spotted searching the Kazakh men’s apartment in New Bedford and a nearby landfill.