Just days after President Obama signed the stimulus package in February, he fired a shot across the bow of state and local government. Obama put the nation's mayors "on notice." If a local government proposes a project that wastes money, he promised, "I will call them out on it and use the full power of my office and our administration to stop it."

But he ought to be asking more of them than the avoidance of waste. What states and localities really need to do -- apart from spending their stimulus money in a hurry -- is to think about the long-term crisis awaiting them. The American Recovery and Reinvestment Act barely begins to deal with this. In fact, the stimulus law's "Cinderella provision" -- all the money has to be spent within two years -- merely sets up a second round for later. It spotlights some serious problems but doesn't fix them. We're sure to be back at the table very soon.

Of course, most state and local governments will happily take every drop of stimulus money and only wish there were more. The American Society of Civil Engineers puts the nation's infrastructure backlog at $2.2 trillion, so even this year's mega-stimulus is just a down payment on needed investments in that category.

But even more ominous than the crumbling concrete is the fact that state and local financial systems are a fiscal time bomb. Over the past two decades, nearly all states and localities have managed to keep their fiscal heads above water. But from now on, even after the economy recovers, their deficits are likely to soar.

The U.S. Government Accountability Office concludes in a sobering report that without major policy changes or a big intervention (read "federal intervention"), a crisis is inevitable. Pension costs for retirees are driving up spending. So are medical benefits for current and retired employees. But the big budgetary monster is Medicaid. GAO projects that state and local revenues will be flat as a share of the economy for years to come. Some major expenditures, including infrastructure and pension costs, may grow at a relatively modest rate. But health care budgets are likely to average 2 percentage points above economic growth for the next 25 years.

Some of this money will go to pay for the rising health costs of poorer Americans. Some of it will cover nursing home care for legions of baby boomers. Future economic slumps will only drive the hole deeper, as revenues plummet and the number of people eligible for the programs rises.

With the red ink bubbling up, state policy analysts look wistfully back to Ronald Reagan's 1982 State of the Union address, in which he proposed that the feds take over Medicaid and give the states responsibility for welfare and food stamps. That, he said, would be "a financially equal swap." Nervous governors didn't take the deal, but history soon proved them (and Reagan) wrong. Medicaid grew much faster than welfare did. The states would have ended up billions of dollars ahead.

Had things worked out differently in 1982, the federal government would now be sweating Medicaid's long-term costs and would have a greater incentive than it currently feels to sort out the nation's health care programs. The states would be able to look forward to a real rebound when the economic recovery kicks in. At this point, however, those scenarios belong to the realm of fantasy.

The stimulus package does feed the cash-starved states $87 billion in Medicaid relief. But, as the states look forward, they know that won't be enough -- either to deal with the recession's extra burdens or the long-term costs Medicaid will bring. Barring major reform, looming deficits will force state and local governments to come back again (and again) for more federal cash. They won't be able to cover their share of the rising health care costs without increasing taxes to unacceptable levels or slashing their spending even further, which would mean less money for their other serious crisis in the construction and maintenance of infrastructure.

When the Washington frenzy over the present meltdown subsides, Obama and Congress will face several choices. They could jump in periodically to provide short-term fixes for the state and local health care dilemma. They could create an automatically triggered relief program that would pump out cash to cover state and local health care costs whenever the economy dipped substantially, with the money targeted to the states hurting the most. Or the feds could embrace a national health insurance program that would take Medicaid health care expenses off state and local governmental books. Given the looming federal deficits, none of these fixes is easy, but it appears increasingly likely that the feds will have to bite one of the bullets.

The 2009 stimulus is providing a shopping spree in which state and local governments can elbow their way to as much cash as they can find. But we don't get many chances like this, with big bucks on the table and a mega-crisis looming, to fix an inescapable problem. As in 1982, the states and cities might miss an historic chance for a game-changing move.