The House on Wednesday approved legislation to provide billions of dollars for medical treatment to rescue workers and residents of New York City who suffered illnesses from breathing in toxic fumes, dust and smoke at ground zero.

The vote was 268 to 160, with 17 Republicans joining Democrats in support of the bill. Opposing the measure were 157 Republicans and three Democrats. Republicans raised concerns about the $7.4 billion cost of the program.

The bill’s fate is unclear in the Senate. Republicans have enough votes to filibuster the measure, and Senate Democrats have not shown great interest in bringing the measure to the floor.

The bill aroused impassioned debate, as 9/11 responders and their relatives watched from the House gallery.

The vote occurred as Congress moved to finish its legislative business quickly and adjourn this week to allow lawmakers to head back home to campaign before the Nov. 2 elections.

The bill calls for providing $3.2 billion over the next eight 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 those health costs. The bill seeks to set aside $4.2 billion to reopen the September 11th Victim Compensation Fund to provide compensation for any job and economic losses.

In addition, the bill includes a provision that would have allowed money from the Victim Compensation Fund to be paid out to anyone who receives payment under the pending settlement stemming from lawsuits that 10,000 rescue and cleanup workers filed against the city. At the moment, anyone who receives a settlement from the city is limited in how much compensation they can receive from the fund, according to the bill’s sponsors.

Until now, Congress has appropriated money on an annual basis to monitor the health of people injured at ground zero and to provide them with medical treatment.

There are nearly 60,000 people enrolled in a variety of health monitoring and treatment programs related to the 9/11 attacks, according to the sponsors of the bill. The federal government provides the bulk of the money for those health programs.

The bill’s supporters have been demanding that the government institute a more permanent health program for 9/11 responders, fearful that annual appropriations are subject to the political whims of Congress and the White House.

But such a program has been opposed by many Republicans, who raised concerns about creating a new federal entitlement to provide health benefits at a time when the federal government is running a huge budget deficit

On the floor, Representative Joe L. Barton, a Republican from Texas, who opposed the bill, argued that it was unnecessary given the fact that Congress had created programs like the Victim Compensation Fund.

After noting that the compensation fund had made billions of dollars in payouts, Mr. Barton said the bill would add the burden of a new entitlement program on taxpayers. “We want to help the victims,” he said.

But the bill’s supporters argued that the nation had a moral obligation to help workers who risked their lives to respond to the crisis at ground zero.

“The 9/11 responders have received a lot of awards and praise, but they tell me that what they really need is health care,” said Representative Carolyn B. Maloney, a Democrat from New York who was one of the bill’s chief sponsors.

Known as the James Zadroga 9/11 Health and Compensation Act, the bill bears the name of a New York City detective who participated in the rescue and recovery efforts at ground zero for about three weeks after the Sept. 11 attack.

He in died in January 2006 after he developed symptoms common to first responders, including difficulty breathing and flulike symptoms. But the cause of his death became the source of debate after the city’s medical examiner concluded that his death was not directly related to the 9/11 attacks.

Representative Lamar Smith, a Republican from Texas, who described the bill as an ”irresponsible overreach,” seized on the controversy surrounding Mr. Zadroga’s death, saying: “This bill is deceptive, starting with its title.”

The vote on Wednesday was the second time this year that the House took up the 9/11 health bill.

In July, Democratic leaders brought the bill to the floor under special rules requiring a two-thirds majority to pass it. A majority of the lawmakers in the chamber supported the bill, but the vote in July fell short of the two-thirds margin needed.

At the time, Democrats were concerned that a vote under normal rules requiring a simple majority would have allowed Republicans to propose a controversial amendment that sought to deny 9/11 health benefits to illegal immigrants.

The amendment would probably have divided Democratic support for the original health bill into two camps: moderates who might feel political pressure to deprive illegal immigrants of such benefits and liberals who flatly oppose the Republican amendment.