Immigration activists who crowded into a Senate committee room to witness the proceedings shouted, "Yes, we can!" as they clapped rhythmically to show their pleasure.
The bill was passed on a 13-5 bipartisan vote, clearing the way for an epic showdown on the Senate floor on the measure, which is one of President Barack Obama's top domestic priorities yet also gives the Republican Party a chance to recast itself as more appealing to minorities.
"I applaud the Committee members for their hard work, especially 'Gang of Eight' members Senators Schumer, Durbin, Graham and Flake. 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," Mr. Obama said in a statement. "I encourage the full Senate to bring this bipartisan bill to the floor at the at the earliest possible opportunity and remain hopeful that the amendment process will lead to further improvements."
In addition to creating a pathway to citizenship for 11.5 million immigrants, the legislation creates a new program for low-skilled foreign labor and would permit highly skilled workers into the country at far higher levels than is currently the case.
At the same time, it requires the government to take costly new steps to guard against future illegal immigration.
The bill is now on its way to the full Senate.
The Associated Press contributed to this report.