A Republican senator said Friday the bombings in Boston raise questions about gaps in the U.S. immigration system, but a Democratic senator rejected such a connection and cautioned against conflating the Boston events with a new immigration bill.

The exchange between Sens. Chuck Grassley, R-Iowa, and Chuck Schumer, D-N.Y., unfolded as the Senate Judiciary Committee convened the first hearing on sweeping, bipartisan legislation to remake the U.S. immigration system. The hearing was overshadowed by the drama in Boston, where police were hunting one of two ethnic Chechen brothers alleged to have carried out the bombings and the other was killed.

Homeland Security Secretary Janet Napolitano had been scheduled to testify, but her appearance was canceled.

"Given the events of this week, it's important for us to understand the gaps and loopholes in our immigration system," Grassley, the committee's senior Republican, said in his opening statement. "How can we beef up security checks on people who wish to enter the United States? How do we ensure that people who wish to do us harm are not eligible for benefits under the immigration laws, including this new bill?"

When he spoke a few minutes later, Schumer, an author of the new legislation, disputed Grassley's argument.

"I'd like to ask that all of us not jump to conclusions regarding the events in Boston or try to conflate those events with this legislation," Schumer said.

"In general, we're a safer country when law enforcement knows who is here," and has photos and background checks, Schumer added — steps that would be taken in regard to the 11 million people here illegally under the legislation Schumer sponsored with seven other senators.

Schumer also said the U.S. refugee and asylum programs have been "significantly strengthened" in the past five years so that authorities are more careful about screening people coming into the country, but he said if that more changes are needed, he's committed to making them.

The immigration legislation would strengthen the border with Mexico, allow tens of thousands of new high- and low-skilled workers into the country and provide an eventual path to citizenship to the 11 million people here illegally. Senators debated Friday whether the bill would provide economic benefits to the U.S. or hurt wages for U.S. workers.