HARTFORD, Conn. -- The cost of the compromise needed to raise the federal debt ceiling will likely inflict more fiscal pain on states still struggling to recover from the recession and the end of federal stimulus spending.

While the details of the spending cuts to states remain unclear, lawmakers from both parties have discussed the need to cut or impose caps on so-called discretionary spending over the next decade.

That could mean wide-ranging cuts in federal aid to states, affecting everything from the Head Start school readiness program, Meals on Wheels and worker-training initiatives to funding for transit agencies and education grants that serve disabled children.

There also is concern among governors, state lawmakers and state agency heads that Congress will make deep reductions or changes in federal aid for health services for the needy, most notably through Medicaid. That could shift more of the costs onto states that already are having trouble balancing their budgets.

"We have the potential for disaster should there be a major realignment in federal funding that results in a cost shift to states," said Nevada state Sen. Sheila Leslie, a Democrat from Reno who recently discussed the issue with Obama administration officials in Washington. "In short, we are teetering on the edge right now, and a cost shift could send us over the cliff."

States already have closed nearly $480 billion in budget gaps since the beginning of the recession, according to the National Conference of State Legislatures.

In Connecticut, for example, officials have struggled to cover a $3.3 billion deficit, accounting for more than 16 percent of the state's main budget account.

About 19 percent of the state's non-transportation revenue comes from the federal government.

"The timing is lousy in every respect," said Benjamin Barnes, secretary of the Connecticut Office of Policy and Management. "It will certainly have a recessionary impact on the overall national economy, and that's the last thing we want right now."

Among the programs that could be affected is a service that delivers meals to the home-bound elderly.

Connecticut received about $4.5 million from the federal government for the program this year and $1.8 million from the state. Marie Allen, executive director of the Southwestern Connecticut Agency on Aging, said the program is a staple for many senior citizens on tight budgets. The federal aid ultimately saves taxpayers money because it helps keep people out of costly nursing homes, she said.

"If we don't have the support for them in the community, people end up in nursing facilities because they don't have proper nutrition," Allen said. "These are the real reasons why we spend more money on skilled nursing care."

State officials across the country are worried about the austerity steps demanded by fiscal conservatives in exchange for raising the nation's debt ceiling, said Brian Sigritz, director of state fiscal studies at the National Association of State Budget Officers. He said the association expects states to be affected by cuts, if not immediately, then in the next year or two.

While the legislation being considered did not cut entitlement programs such as Medicare and Medicaid, it did call for creating a special congressional committee to find additional savings. That next step likely would lead to specific recommendations to trim spending on entitlement programs.

Darrell Steinberg, president pro-tem of the California state Senate, said he is concerned about such cuts, especially if they reduce payments to the states for Medicaid, which provide health care for the poor and disabled. The state's version is known as Medi-Cal and covers 7.5 million people.

Significant cuts could force California to look for ways to make up for the funding at a time when the state is slowly emerging from a recession that has left it with one of the highest unemployment rates in the nation. Lawmakers closed a $26.6 billion shortfall this year, partly with the help of rising tax revenue.

"Certainly in California, we're on the verge of turning a corner ..." said Steinberg, a Democrat. "We want to go forward, not backwards."

A concern in many states is a possible change in the federal-state formula known as FMAP, which is used to fund Medicaid programs. In Nevada, for example, the federal government pays 55 percent of the cost. Every 1 percent of cost that is shifted to the state equals roughly $15 million.

"The change in FMAP is probably one of the more fearful ones that we could experience," said Mike Willden, director of the Nevada Department of Health and Human Services.

Not all state officials are dismayed by the possibility of broad-based cuts in federal aid.

Alaska Gov. Sean Parnell said he believes substantial funding cuts would have less of an impact on his state than allowing the federal government to stay on its current course of mounting debt.

He is among a small group of GOP governors who signed a pledge urging Congress to oppose increasing the debt limit unless certain conditions are met, including substantial spending cuts.

"We need a serious directional change to recover, and merely raising the debt limit will lead only to disaster," he wrote in a recent email.

The long-term effects of a compromise to raise the debt ceiling could come as a surprise to many state officials, said Rep. George Miller of California.

The top Democratic lawmaker on the House Education and Workforce Committee said he has received almost no input so far from state education departments and local school districts about the looming spending cuts. He said reductions contained in the debt-ceiling legislation are "going to make life much more difficult for" for public schools.

Robert Moran, who represents the American Association of State Colleges and Universities, said plans offered by the leaders of the House and Senate each kept a major aid program largely intact. Pell grants, which provide up to $5,550 to low-income students, would sustain cuts, but they would be relatively small, he said.

"I think the higher-education community was probably pleasantly surprised about that," he said.

But he said colleges still face a double-whammy -- federal cuts coming on the heels of deep state cuts. In many university systems around the country, departments have lost funding and class offerings have been reduced.

Barry Toiv, the vice president of public affairs for the Association of American Universities, said continuing to take money out of education would slowly and steadily degrade the quality of the nation's universities and affect America's ability to produce the next generation of leaders.

"It's like termites in the wall, gradually eating away at the underpinnings of our innovation," he said. "If you do that over a long period of time, at some point you're no longer leading the world. And eventually, like with termites in the wall, you're not really going to have a house anymore."