Homeland Security officials have redoubled their efforts to check foreign students’ visas at airports and border crossings since a Kazakh student charged with destroying evidence in the Boston Marathon bombings used an invalid visa to reenter the United States in January.

Azamat Tazhayakov, a friend of suspected bomber Dzhokhar Tsarnaev, passed through a security checkpoint at New York’s John F. Kennedy International Airport 16 days after the University of Massachusetts Dartmouth notified federal officials that his low grades had invalidated his student visa.

“How do you get back into this country without a visa?” Senator Charles Grassley, ­Republican of Iowa, said by phone Friday. “Is our system working or isn’t it?”

Federal investigators ­arrested Tazhayakov and his roommate, Dias Kadyrbayev, both 19-year-old students from Kazakhstan, for alleged immigration violations five days ­after the deadly attacks, intensifying concerns that Homeland Security is failing to properly monitor the 850,000 foreign students and their US schools at a time when student visas are soaring.

After the bombings, officials issued an order “effective ­immediately’’ telling agents to verify that every foreign student coming into the United States has a valid visa, by checking their paper records against a computer database of foreign students. Officials are also making sure that Customs and Border Protection, the Homeland Security agency that screens arrivals at airports and borders, has updated information on foreign students.

Homeland Security said Wednesday the system was fixed but on Friday they clarified that they were still working on it. “DHS is reforming the student visa system to ensure that [Customs and Border Protection] is provided with real time updates on all relevant student visa information,” Peter Boogaard, spokesman for the Department of Homeland ­Security, said Friday.

Federal officials cautioned Friday that the Kazakh men had no criminal records or other red flags that would have triggered an immigration inves­tigation until federal investigators discovered that the men were college buddies of Tsarnaev. But officials acknowledged they did not know that Tazhayakov’s visa was invalid when he passed through the customs checkpoints on Jan. 20.

Tazhayakov’s lawyer said ­Tazhayakov was also unaware that his visa was invalid at the time.

About 10,000 US schools and colleges are accredited to accept foreign students, accord­ing to the Government Accountability Office, and colleges and universities are increas­ingly recruiting abroad in part because foreign students tend to pay higher tuition rates.

Last year the United States issued 486,900 new F1 visas, the type the Kazakh students had, which typically are valid for the course of their studies. That is more than double the number ­issued in 2002, according to the State Department.

Last year the Government Accountability Office raised concerns that US officials were not working effectively enough with criminal investigators and others to detect fraud or monitor schools in the program.

“We know that they’re not monitoring them,” said Jessica Vaughan, director of policy studies at the Washington-based Center for Immigration Studies, which favors stricter limits on immigration. “They only go after overstays if there’s an obvious national security or public safety concern with a student who has overstayed. Everybody else is not bothered.”

To obtain a student visa, foreigners must first gain acceptance into an approved American school, from an elementary school to a university. Then students must apply for the visa, pay government fees, and submit to an inter­view and background check, including fingerprints, at a US embassy or consulate.

US Immigration and Customs Enforcement, a Homeland Security agency, is in charge of monitoring the Student and Exchange Visitor Program in cooperation with school and university officials, who help monitor students’ ­academic status and other matters through a database known as Sevis.

UMass Dartmouth, a 9,000-student campus that was evacuated after the bombings, said Friday that they were in full compliance with the student ­visa program.

“After a full review of our ­records, we are very confident that the university followed all laws and policies related to the international students arrested in connection with the Boston Marathon tragedy,” John Hoey, assistant chancellor for public affairs, said in an e-mail.

Federal immigration agents arrested Kadyrbayev and ­Tazhayakov for immigration ­violations after the investigation into the April 15 bombings, and they have since been charged in US District Court with helping cover up evidence from the deadly attacks by taking Tsarnaev’s backpack and empty fireworks from his room and tossing them in a trash bin.

Their lawyers have said the men had no idea Tsarnaev was a suspect in the bombings, though federal investigators say they tried to hide some of the friend’s belongings after realizing he was involved in the bombings. The two Kazakh men, and a Cambridge man who is charged with making false statements in the investigation, are in federal custody.

The bombings killed three people and injured 260 more. An MIT police officer was later killed, allegedly by the bombers, according to police.

Under the student visa program, UMass Dartmouth and other schools are required to update student records and alert immigration authorities to any changes in their status in school. Schools and students have some flexibility; for example, students who run into academic problems or other issues have 30 days to resolve the matter with the school.

Students whose visas are terminated by the school or officials are supposed to leave the United States, officials said.

Linda A. Cristello, Tazhayakov’s immigration lawyer, said he returned to the United States from winter break on Jan. 20 believing that his visa and the underlying paperwork were still valid.

“He came in and used his passport,” she said. “He did what he was supposed to do.”

Cristello said Tazhayakov ­realized the school had terminated his student status when he tried to register for classes, and he immediately fixed it. He switched majors from engineering to economics, took an exam, and was ­enrolled within days. The school suspended him Wednesday because of the criminal charges.

A federal immigration prosecutor disputed Cristello’s ­assertion in court, but the issue is unlikely to be resolved soon because the Kazakh men’s immi­gration cases have been postponed pending the outcome of the criminal charges.

In contrast, Tazhayakov’s roommate, Kadyrbayev, had allegedly been in the United States on an invalid visa since Feb. 27, when the school terminated him for low grades and poor attendance.

University officials have said that Kadyrbayev was not ­enrolled this term and had last completed the fall semester, which ended in December, two months before the school terminated him in the computer system.

Schools have 21 days to ­update the foreign student data­base if a student has failed to maintain grades or meet other criteria, a federal law enforce­ment official said Friday. Cristello, who also represented Kadyrbayev, declined to comment on why Kadyrbayev stayed in the United States longer than he was permitted.

Grassley, the top Republican on the committee considering legislation that would overhaul the nation’s immigration system, said he hoped the Kazakh men’s immigration violations would not derail the bill. But he said Homeland Security should explain what happened so they can address any issues in the legislation.

“We need to be deliberate in this process,” said Grassley, who this week urged Homeland Security Secretary Janet Napolitano to explain the ­Kazakh men’s cases. “We can’t afford to screw up again, particularly in the age of terrorism.”