Sen. Chuck Grassley, R-Iowa, said a comprehensive immigration reform bill puts legalization ahead of border security, a major complaint among Republicans critical of the bill that was taken up Thursday by a Senate committee, the beginning of what will probably be a lengthy debate.

Backers of the bill, including Sen. Dick Durbin, D-Ill., one of its authors, countered that major strides have been taken to secure the border over the past decade, and delaying legalization would keep millions in the shadows and endanger national security.

Border security was a key dividing line between Republican opponents of the bill and its supporters. Grassley sought to make a major change by proposing that the bill require the legalization process wait until the entire border had been secured for six months.

"No one can dispute that this bill is legalization first, enforcement later," he said.

The proposal was defeated, 12-6, with two Republican members of the "Gang of Eight" that drafted the compromise bill voting along with Democrats to oppose the change.

Sen Jeff Flake, R-Ariz., said the change would delay legalization, exacerbating problems in border areas.

"Is America safer with 11 million people in the shadows?" added Durbin. "Of course, we're safer if they come forward."

Grassley is the top Republican on the committee, and he was quite critical of the legislation. He likened it to the health care overhaul because of the number of times it delegates action to the executive branch.

The nearly 900-page proposal would be the most far-reaching piece of immigration legislation in years.

Four Republicans and Four Democrats came up with the plan, but even some of the authors say it will probably have to be changed if it is to pass the Senate.

The proposal is of major importance to border states, but it also is being watched in places such as Iowa.

Pro-immigrant groups have noted this weekend is the fifth anniversary of the federal raid on Agriprocessors Inc. in Postville, Iowa, where more than 300 people were arrested.

Members of Iowa Citizens for Community Improvement have held community meetings about the issue the past two months and lobbied lawmakers.

The group was critical Thursday of Grassley for the number of amendments, 77, that he filed on the bill.

In a statement, Nataly Espinoza, an Iowa CCI member from Des Moines, said the group wants legislation "that ends deportations and harsh enforcement, protects workers' rights, and puts a clear and realistic path to citizenship for all 11 million undocumented people ahead of border control.”

There were major differences over how secure the border is now.

Get news headlines sent daily to your inbox

Sen. John Cornyn, R-Texas, suggested that only a quarter of attempted illegal crossings were being stopped, a claim for which Durbin said there was no evidence.

Democrats said significant increases in spending on border security in the last decade had made it tighter than it has been in years. Grassley responded if that was the case, his amendment requiring security before the legalization process could begin should be an easy one to accept.

The committee did approve an amendment he offered that would apply border security strategies to not just high-risk areas but to the whole border.

It was one of more than 30 amendments the committee dealt with. More than 300 proposed revisions were filed, though not all of those will likely be taken up.

The overall package not only proposes a pathway to legalization for people in the country illegally — after they meet certain conditions — but it also makes changes to the country's visa system and creates requirements on businesses that are aimed at trying to prevent the hiring of undocumented workers.