A notebook with proposed amendments to the Senate Judiciary Committee's immigration reform legislation sits on a table during a markup session Monday. On Tuesday, the landmark bill cleared the committee. / Chip Somodevilla Getty Images

by Alan Gomez, USA TODAY

by Alan Gomez, USA TODAY

After three long weeks of hearings and debates, spectators burst out into screams and applause Tuesday night after the Senate Judiciary Committee approved an immigration bill that would be the biggest overhaul to the nation's immigration laws in a generation.

The bill was produced by a bipartisan group of senators known as the Gang of Eight. With four of those members on the committee, the bill survived 212 amendments over five lengthy hearings.

Left intact was the core of the bill, which will allow the nation's 11 million unauthorized immigrants to apply for U.S. citizenship, add significant investments in border security and fundamentally alter the legal immigration system of the future.

The committee approved the bill 13-5, meaning the bill is on track to be debated on the full Senate floor beginning the first week of June.

Some Republicans warned that the amendment process had done little to assuage their fears that they were facing a repeat of 1986, when Congress last passed a sweeping immigration bill that allowed up to 3 million people to gain citizenship, but did not fulfill its promises of fully securing the nation's borders.

"Today, we're right back at the same place talking about the same problems and proposing the same solutions," said Sen. Chuck Grassley, R-Iowa, and the ranking member of the committee.

The committee's chairman, Sen. Patrick Leahy, D-Vt., said it was not "the bill I would've written," but he called it the best opportunity for immigration reform he's seen in years.

"We've demonstrated to the United States Senate that we can all work together, Republicans and Democrats," Leahy said. "Now let's go out of this room, and work together with the other members of the Senate."

President Obama issued a statement late Tuesday, congratulating the committee for advancing the bill that is "largely consistent with the principles of common-sense reform I have proposed and meets the challenge of fixing our broken immigration system."

"None of the committee members got everything they wanted, and neither did I, but in the end, we all owe it to the American people to get the best possible result over the finish line," the statement read.

Tuesday's vote capped off a grueling, sometimes-emotional trek through the committee where senators voted on everything from visas for displaced Tibetans to the ability of unauthorized immigrants to access government benefits. Sponsors of the bill tried to accept as many Republican amendments as they could to garner their support, while holding off "poison pill" amendments that could scuttle the carefully negotiated bill.

One example came Tuesday, when Sen. Orrin Hatch, R-Utah, and Sen. Charles Schumer, D-N.Y., finished days of negotiations and reached a breakthrough compromise on visas for high-tech workers.

The bill increases the number of H1-B visas that are primarily given to foreigners trained in science, technology, engineering and mathematics fields, but Hatch and other Republicans worried that the bill placed too many restrictions on U.S. tech companies trying to hire those workers. Tuesday's agreement requires companies to make a good faith effort to hire Americans for high-skilled technology jobs, but eases some of the hiring requirements originally in the bill.

Hatch called it a "sensible and reasoned balance" that made the final product a "much more acceptable bill."

Sponsors of the bill also found middle ground in the border security debate.

The committee voted down an amendment from Sen. Jeff Sessions, R-Ala., to require that all the nation's airports, seaports, and land ports of entry establish a system to collect the fingerprints of all departing foreigners. Republicans, and some Democrats, feel that is the most efficient system to track who has remained in the country after their visas have expired. That is a major concern since 40% of the nation's 11 million unauthorized immigrants fall into that group.

On Monday, the committee accepted a scaled-down version of the program. Under an amendment filed by Hatch, the nation's 10 busiest international airports will have to implement the program within two years, and it will be expanded to the 30 biggest airports within six years.