Comprehensive immigration legislation passed by the Senate would reduce illegal immigration into the U.S. by one-third to one-half beyond what would happen under existing law, the Congressional Budget Office said Wednesday.

That’s a significantly greater reduction than the nonpartisan budget office said would have resulted from an earlier version of the bill approved by the Senate Judiciary Committee, which would have cut illegal immigration only by 25 percent.

Partly in response to that earlier finding, senators agreed to greatly boost border security in the bill and take steps against people who overstay their visas. Those changes helped the legislation pass the Democratic-controlled Senate with a bipartisan 68-32 majority last week. It’s now pending in the Republican-led House, where it faces an uncertain future.

The CBO also said that despite spending $36 billion more on border security than would have happened under earlier versions of the bill, the legislation would still reduce the budget deficit by $158 billion over 10 years and $685 billion in the decade after that. Taxes paid by newly legalized residents, along with other revenue, would outpace new spending for government benefits and other costs under the bill. The measure, if enacted, would cost the government about $23 billion to implement over the first 10 years.

The legislation would double border patrol agents stationed along the U.S.-Mexico border while calling for hundreds of miles of fencing and requiring all businesses to check their workers’ legal status. Some 11 million immigrants already here illegally would be able to attain citizenship over 13 years if they pay fines and taxes and meet certain requirements. New and expanded worker visa programs would allow tens of thousands of new workers into the country for high-skilled and low-skilled professions.

“CBO once again vindicated immigration reform and shows how the amendment process improved the bill,” Sen. Chuck Schumer, D-N.Y., said in a statement, referring to the border security amendment championed by Republican Sens. Bob Corker of Tennessee and John Hoeven of North Dakota.

“CBO has reaffirmed that immigration reform reduces the debt and grows the economy. It also shows that the Corker-Hoeven amendment further substantially reduces the flow of illegal immigrants, even using a methodology that underestimates how effective immigration reform will be in reducing that flow,” Schumer added.

The bill is a top second-term priority for President Barack Obama.

Under the legislation as passed, the report found, there would be about 2.4 million fewer immigrants coming illegally into the country or illegally overstaying their visas over the next 10 years than would happen under current law.

Despite that reduction, with new visa programs bringing many more workers to America, the bill would increase the U.S. population by 9.6 million people over a decade, the report said.

Opponents said the report showed the bill doesn’t do enough to stem illegal immigration.

“CBO says that the Senate bill with all its promises about extra enforcement would still allow half the illegal immigration flow to continue,” said Roy Beck, head of NumbersUSA, in a statement. “This CBO finding suggests that by 2020 the illegal population will have grown big enough that presidential candidates will once again be pressed to promise yet another amnesty.”