It was adopted by Congress in 1997 almost as an afterthought — a new formula to keep Medicare spending on doctors from growing faster than the economy as a whole.

But like a snowball that swells in size as it rolls down a mountain, the rate-setting formula has transformed into a budget-busting juggernaut that will hit doctors with a 27.4 percent pay cut for their Medicare patients in January unless legislators step in.

The cost of congressional intervention has ballooned just as formidably: Postponing the cuts — the solution Congress has turned to every year since 2003 — would cost $21 billion for a one-year delay and $38.6 billion for two years. Fully repealing the formula would add nearly $300 billion to the deficit, according to the Congressional Budget Office.

On Tuesday, the Republican-led House voted for the two-year option — including it in a bill that would also extend the payroll tax cut and federal benefits for the long-term unemployed.

That bill is the subject of contentious negotiation with the Democratic majority in the Senate, but physicians’ groups remain hopeful that the two parties will agree on some way to avert the cut in doctors’ payments. Still, at best, this would represent yet another short-term fix, said the American Medical Association’s president-elect, Jer­emy Lazarus.

“We’re doing the same old thing, and the result will be the same,” he said. “ We’re just going to make the problem worse down the line. By 2016, it’s going to cost $600 billion to eliminate this for good.”

Virtually no one imagined that the “sustainable growth rate” — or SGR — formula would wreak such havoc when it was adopted as a minor piece of the Balanced Budget Act of 1997. Back then, Medicare’s spending on physicians, which accounts for a small share of the program’s overall spending, wasn’t growing fast. The law also included other restraints that have since been repealed. Analysts predicted that, at most, the SGR formula would curb physician payments by a minimal amount.

“It wasn’t viewed as a big deal at the time,” said Paul Van de Water, an economist specializing in Medicare with the Center on Budget and Policy Priorities, a left-leaning research group. “They needed a few more billion dollars in savings [for the Balanced Budget Act], so they just tacked on the SGR arrangement.”

Its flaws became apparent by the end of 2001. Through a series of complicated calculations, the SGR formula in effect means that if spending due to increased use of services by Medicare patients rises faster than the nation’s gross domestic product, Medicare must compensate by cutting reimbursement rates for physicians enough to bring spending back in line with GDP growth.

The trouble is that much of the rise in the use of physician services in recent years has been a good thing, said Stuart Altman, a health economist at Brandeis University.

“The health-care system keeps coming up with more expensive procedures and techniques,” he said. Many improve health and save lives.

Of course, not all of the new techniques and procedures help patients, Altman added. There is concern, for example, that doctors are increasingly requesting expensive imaging tests based on symptoms that don’t call for such aggressive investigation.

But the SGR doesn’t distinguish between doctors who have provided unneeded services and those who have not: It penalizes with pay cuts all physicians who treat Medicare patients.

Congress went along when the SGR formula called for its first pay cut, a 4.8 percent reduction in 2002. But lawmakers have overridden the system every year since.

Their early method of doing so exacerbated the problem. To avoid having to come up with other budget cuts to cover the cost of each short-term delay, Congress promised to make a commensurately larger cut spread out over the following 10 years.

This system of “clawback financing” enabled lawmakers to ensure the delay in imposing the cuts would come out as budget-neutral. But it also meant that Congress was expanding the budget hole created by the loss of SGR-mandated savings.

By 2007, the budget impact had grown so large that Congress switched to a new strategy. Now with each “doc fix,” lawmakers promise to enact the full amount of the cut as soon the delay period expires, but they find other budget cuts to offset the cost of the short-term postponement.

This has slowed the growth of the looming pay cut. But it has introduced a new challenge: coming up with budget offsets both parties can agree on.

“Every time, it comes down to not just the 11th hour but the 59th second,” Lazarus said. “And that uncertainty and instability is the worst part of this for doctors.”

Meanwhile, despite long-standing and virtually universal agreement that the SGR formula should be eliminated, attempts to do so have faltered in the face of the daunting price.

“Congress is like the person who is persistently overweight and says, ‘I’m going to go on a diet tomorrow.’ Then tomorrow comes and you say, ‘I’m going on a diet tomorrow.’ And with each successive tomorrow, you keep repeating the same statement,” said Henry Aaron, an economist at the Brookings Institution.

Many expect the issue will only be addressed as part of a larger “grand bargain” to reduce the deficit by trillions of dollars. And physicians were initially hopeful the congressional debt supercommittee would offer such a vehicle.

The panel’s failure to agree on a deal last month has left something of a vacuum, with no proposal on the table for paying the full cost of a permanent fix.

Altman predicts that at some point lawmakers will have to “hold their noses” and agree to a final doc fix that simply adds to the deficit. But that’s hard to imagine in the current debt-focused political environment.

“At some point, we absolutely have to deal with this,” Altman said. “But we don’t have the right mentality in Washington right now.”

Staff writer Rosalind Helderman contributed to this report.