The House passed legislation Thursday to temporarily stave off upcoming cuts in Medicare payments to doctors after a last-minute scramble by party leaders to secure enough support.

The bill now goes to the Senate, where Majority Leader Harry Reid, D-Nev., hopes to pass the measure before a Monday deadline.

The so-called "doc fix," if it clears the upper chamber, would be the 17th time Congress has enacted a short-term extension to keep a 1997 budget-cutting law from biting too deeply into payments for physicians who treat Medicare patients. If not, doctors who treat Medicare patients would see their payments reduced by about 24 percent beginning next week.

Letting the doc fix expire would save the federal government billions of dollars annually, but some doctors have threatened to stop seeing Medicare patients if their payments are cut.

Many lawmakers from both parties opposed the stopgap measure, which would extend payments to doctors through the end of the year, in the hope of finding a permanent solution to the poorly designed Medicare payment formula.

The influential American Medical Association has lobbied against a short-term fix, saying it would undermine efforts for a permanent solution. And new Senate Finance Committee Chairman Ron Wyden, D-Ore., also has pressed hard for a permanent solution for the same reason.

But supporters said that voting against the temporary fix would hurt patients' care.

Before the vote, controlling House Republican leaders were rallying members for support on the chamber floor, and there was speculation the bill would be pulled due to a lack of votes.

But after a compromise brokered by Majority Leader Eric Cantor, R-Va., and Minority Leader Nancy Pelosi, D-Calif., a surprise voice vote was called, which allowed the bill to pass without members having to register how they voted.