Michael Reynolds/European Pressphoto Agency

The Senate on Wednesday approved a bill to cover the cost of medical care for rescue workers and others who became sick from breathing in toxic fumes, dust and smoke after the 2001 attacks on the World Trade Center.

The measure, which passed by a voice vote, came soon after a deal was reached between conservative Republicans and Senators Charles E. Schumer and Kirsten E. Gillibrand, Democrats of New York. Mr. Schumer and Ms. Gillibrand agreed to changes demanded by the conservative lawmakers, who raised concerns about the measure’s cost and prevented the bill from advancing in the Senate. After drawing criticism in recent days from Democrats and Republicans alike, the Republican senators backed down.

Under the new agreement, the bill provides $4.3 billion over five years for health coverage to the 9/11 workers, instead of the original $7.4 billion over eight years.

In a joint statement issued on Wednesday, Mr. Schumer and Ms. Gillibrand called the deal a “Christmas miracle.”

“Over the last 24 hours, our Republican colleagues have negotiated in good faith to forge a workable final package that will protect the health of the men and women who selflessly answered our nation’s call in her hour of greatest need,” the statement said. “This has been a long process, but we are now on the cusp of the victory these heroes deserve.”

One of the main critics of the bill, Senator Tom Coburn, Republican of Oklahoma, expressed satisfaction with the legislation’s final price tag.

“Every American recognizes the heroism of the 9/11 first responders,” he said. “But it is not compassionate to help one group while robbing future generations of opportunity.”

The new version of the bill calls for providing $1.8 billion over the next five years to monitor and treat injuries stemming from exposure to toxic dust and debris at ground zero; New York City would pay 10 percent of these costs. The legislation also sets aside $2.5 billion to reopen the September 11th Victim Compensation Fund for five years to provide payment for job and economic losses.

An additional provision allows for money from the Compensation Fund to be paid to any eligible claimant who receives a payment under the settlement of lawsuits that 10,000 rescue and cleanup workers recently reached with New York. Currently, those who receive a settlement are limited in how much compensation they can get from the fund, according to the bill’s sponsors.

There are nearly 60,000 people enrolled in health-monitoring and treatment programs related to the 9/11 attacks, according to the bill’s sponsors. The federal government provides the bulk of the funding for these programs.

The deal reached on Wednesday was a major turn of events for a bill that had been stalled in the upper chamber. Only 12 days ago, Senate Republicans blocked the legislation from proceeding to a floor vote.

But the lawmakers relented after facing a barrage of criticism — not just from Democrats, but also from traditional Republican allies, including former Mayor Rudolph W. Giuliani of New York, and conservative news outlets like Fox News.

Later in the day, the House swiftly approved the measure and sent to President Obama for his signature.