The key to shoring up Social Security may be granting legal status to currently undocumented immigrants. A new study by the Social Security Chief Actuary found that the Senate immigration bill would add $275 billion in Social Security taxes by 2024, just over half of it coming from additional tax payments from the estimated 8 million immigrants who would transition into ‘registered provisional immigrant’ status. The bill would also create more than 3.2 million net jobs and boost GDP by 1.63 percent over a decade according to the study.

A report released by the Heritage Foundation earlier this week has sparked a furious back-and-forth in Washington over the true economic costs and benefits of comprehensive immigration reform. Critics of reform are arguing that adding new immigrants would worsen labor conditions in an already difficult job market, and that a path to citizenship for previously undocumented immigrants would drain government funds and overburden welfare programs.

But the Chief Actuary’s report shows that the Senate immigration bill would increase economic output, and that the subsequent increase in tax revenues would help the federal balance sheet and aid Social Security solvency.

Currently undocumented immigrants would drive most of the increase in government revenues, the report said, because these workers would come out of the underground economy after legalization. Economic studies have shown that legal status increases returns to investments in education, and pushes immigrants into more productive jobs. This would boost tax revenues significantly, the Social Security report affirms. Undocumented workers have already contributed up to 10 percent – or $300 billion – of the Social Security Trust Fund.

The real fiscal benefits of immigration reform may be years down the line. The SSA has not yet estimated the 75-year impact of the immigration bill, but does point out that “the additional births for the increased population under this bill will have substantial positive effects.” Demographers estimate that more than 80 percent of population growth in the next 40 years will come from immigrants and their children – without immigration, the labor force would otherwise begin shrinking around 2015.

On Tuesday, we highlighted five surprising facts about the fiscal impact of immigration reform, including the impact of immigration reform on Social Security.