Two foreign students arrested Saturday in New Bedford for allegedly violating their student visas are from Kazakhstan and may have known the brothers accused of bombing the Boston Marathon, according to a statement from the nation’s Ministry of Foreign Affairs.

FBI and Homeland Security agents wearing hazmat suits descended on the students’ neighborhood on Monday and searched their apartment, according to media reports in New Bedford.

Kazakhstan’s foreign ministry said US immigration officials discovered the students while investigating the Tsarnaev brothers’ “possible links and contacts,’’ particularly those who studied with them. The students – two men — are being held in Boston, according to the ministry and a US official.


“During the investigation, it was revealed that two students from Kazakhstan had violated the U.S. visa regime in the course of their studies. They were consequently arrested until the full clarification of the circumstances is achieved,’’ the ministry said in a statement.

The New Bedford students are being held on civil immigration violations, not criminal charges, which is why federal officials have not disclosed their names to the public. US immigration officials usually withhold the names of immigrant detainees purportedly to protect their privacy, even though detainees are often held in the same jails as criminals.

Kazakhstan’s consul is in Boston to work with the students, their families and US authorities, according to the ministry. The oil-producing nation of 17 million people was formerly a part of the Soviet Union. The United States was the first nation to recognize the nation’s independence in 1991, federal records show.

On Monday, Kazakhstan officials assured the United States that they were willing to cooperate on issues of terrorism. “We would like to reaffirm our openness to cooperation with the United States on the issue and emphasize that Kazakhstan strongly condemns terrorism and acts of terrorism in any form,’’ the embassy said.