Updated

A bipartisan immigration bill pending in the Senate would strengthen the Social Security trust fund by adding millions of workers to tax rolls, and provide a boost to the overall economy, according to an analysis Wednesday by the Social Security Administration.

The finding came in a letter to Sen. Marco Rubio, R-Fla., who requested the analysis, from Stephen C. Gross, chief actuary for the agency.

It could provide a boost for the immigration bill, which has been attacked by some conservatives as overly costly, as the Senate Judiciary Committee prepares to take up the legislation for amendments and votes beginning Thursday. Meanwhile, a separate dispute loomed as religious leaders warned that adding a gay rights provision to the immigration legislation could cost their support.

Gross' analysis said the immigration bill would boost Social Security's coffers by more than $240 over the coming decade and add $64 billion in new tax revenues to Medicare. It also would increase the size of the economy by a full percentage point by 2017, and increase employment.

Gross wrote that the overall effect of the bill on the long-range trust fund balance "will be positive."

Social Security has long-term financial problems because, as more people retire and live longer, there will be relatively fewer workers paying into the system. In 1960, there were 4.9 workers paying Social Security taxes for each person getting benefits. Today, there are about 2.8 workers for each beneficiary, a ratio that will drop to 1.9 workers by 2035 under current law, according to projections by the Congressional Budget Office.

The actuary's letter suggests the immigration bill would slow this trend. Under the bill, there would be nearly 6.6 million more workers paying Social Security taxes in 2024, the actuary projects. That same year, there would be an additional 683,000 people getting benefits. That's nearly 10 additional taxpayers for each new beneficiary.

The Social Security analysis is the first government analysis to quantify economic impacts from the far-reaching bill authored by Rubio and seven other senators, both Democratic and Republican.  The legislation came under attack earlier this week in a disputed report from the conservative Heritage Foundation, which claimed the bill would cost $6.3 trillion over 50 years as newly legalized immigrants consume government benefits without paying an equal amount in taxes.

The Social Security analysis doesn't attempt to determine the overall cost of the bill. That figure will be provided by the Congressional Budget Office, which has not yet released its projections.

But the analysis does measures some impacts of the bill, which aims to secure the border, create new avenues for workers to come legally to the U.S., ensure employers don't hire workers here without legal status, and give a path to citizenship to the millions already here illegally.

The analysis finds that of about 11.5 million immigrants here illegally who would be eligible under the bill, around 8 million would apply for and be granted legal status. Many would immediately become taxpayers, but the bill prevents them from receiving government benefits for over a decade.

In the longer term most of these new taxpayers would eventually receive benefits, but the actuary said he still expects the bill to improve the long-term health of Social Security.

The analysis also said that provisions in the bill would reduce by about a half-million per year the future number of people entering the country illegally.

On the gay rights issue, religious leaders issued a warning Wednesday about the impact on the immigration bill if Senate Judiciary Committee Chairman Patrick Leahy, D-Vt., moves forward with an amendment to allow gay Americans to sponsor their foreign partners for U.S. residence like straight married Americans can.

"We're extremely hopeful that this bill will remain an immigration bill and not get tangled up with the issue of gay rights," Richard Land, a leader of the Southern Baptist Convention, told reporters on a conference call. "But if it did, if it did, the Southern Baptist Convention would not be able to support the bill."

Other religious leaders on the call echoed Land's warnings. Leith Anderson, president of the National Association of Evangelicals, labeled the gay rights provision "a divisive distraction that must not derail immigration reform."

Rubio and the three other Republican authors of the immigration bill have said that such a provision could cost their support and kill the bill.
  "If that issue is injected into this bill, this bill will fail. It will not have the support. It will not have my support," Rubio said last week in an interview with conservative radio host Hugh Hewitt.

If Leahy were to offer a gay marriage amendment, attention would turn to Sens. Chuck Schumer, D-N.Y., and Dick Durbin, D-Ill., to see whether they would support it. Schumer and Durbin are among Democratic authors of the bill and both sit on Leahy's committee. Both have expressed support for Leahy's goals on the gay marriage issue without saying how they would vote on his amendment.

Gay rights groups are lobbying aggressively for the gay marriage language to be included and they dispute suggestions that it would jeopardize the bill.

"It's not something that should be considered a poison pill or a hot potato," said Gregory T. Angelo, who runs the gay GOP group Log Cabin Republicans.

"There are 11 states and the District of Columbia that recognize relationships between committed same-sex couples," Angelo said in an interview. "These are individuals who are here legally, who are in marriages and who are denied the rights of their straight counterparts."

President Barack Obama included a provision recognizing gay partnerships in his own immigration bill, but he has made it clear in recent comments that the Senate measure meets his criteria for an immigration overhaul, even without the provision.