WASHINGTON — Legislation to give doctors a yearlong reprieve from a looming 24 percent cut in their payments from Medicare overcame turbulence in the House on Thursday and appears on track to clear the Senate next week, possibly just hours before a Monday midnight deadline.

The bill passed the House on a surprise voice vote after an hour-long delay signaled that Republican leaders were having difficulty mustering the two-thirds vote to pass the bill under fast-track procedures. Prominent Democrats withheld support, as did a host of rank-and-file Republicans, which led top leaders in both parties to call off a roll call vote and ease the measure through with a wink and a nod.

The vote was engineered by Majority Leader Eric Cantor, R-Va., with cooperation from top Democrats, particularly Minority Leader Nancy Pelosi of California.

It came after several leading Democrats weighed in against the bill, which would “patch” the Medicare fee system for 12 months. They complained that the temporary measure would set back efforts to find a permanent fix for the program’s flawed Medicare payment formula, which has bedeviled lawmakers for more than a decade. There is widespread support for legislation to permanently solve the problem, but no agreement on how to pay for it.

The measure represents the 17th time that Congress has stepped in with a temporary fix to a poorly designed Medicare fee formula that dates to a 1997 budget law. The House vote came after efforts to permanently fix the formula appeared to have fizzled

The measure blends $15 billion to address Medicare physicians’ payments with about $5 billion more for a variety of other expiring health care provisions, like higher Medicare payments to rural hospitals and for ambulance rides in rural areas. On Wednesday night, the Congressional Budget Office released an analysis that said the bill would increase spending by $14 billion over the next two years and that almost $11 billion of the legislation’s savings wouldn’t accrue until 2024.

Savings come from curbs on payments to hospitals that care for a large share of indigent patients and by employing a gimmick regarding automatic Medicare cuts that aren’t due for another 10 years.