Maryland Gov. Martin O’Malley’s proposal to shift half of rising teacher pension costs to counties has merged with the General Assembly’s effort to make it harder for counties to cut classroom spending, creating a proposed fix-all for education funding issues that have long confounded state legislators.

And no one is likely to be happy with the outcome.

A decade after Maryland lawmakers voted to dramatically increase education spending, the state is still struggling to pay for the progress, seen in the form of national awards and notable increases in student test scores.

It is a starkly different, but no less controversial, debate than in most other states, including Virginia, where lawmakers have cut or frozen facets of education spending since the beginning of the economic downturn.

A draft of the latest attempt by Maryland lawmakers to address the rising costs — the legislature’s second serious try in five years — could be voted on by the Maryland Senate’s budget committee as early as Thursday.

According to several lawmakers and others familiar with the plan, it calls for the state to curb the fastest-growing cost of its education success: teacher pensions, whose annual cost has more than doubled to nearly $1 billion since 2006.

Greater education funding from the state to counties has led schools to increase teacher pay and been credited with creating better-prepared students. But it has also led to bigger obligations on the state’s underfunded retirement system.

The Senate’s plan would gradually shift a share of the ongoing costs for teachers’ retirements to counties while leaving the state on the hook for the existing imbalance in the system, which critics say was partly a result of poor management by the state.

It would not be as great a shift as that sought by O’Malley (D), who wanted to use the realignment to cut a quarter of the state’s own shortfall of nearly $1 billion, but counties say it will still be far more than what they can afford.

School boards also likely won’t be happy. The plan calls for sending the bill for teachers’ pensions to school boards, not to counties, whose executives have appeared in Annapolis almost daily in recent weeks to warn that any shift would force layoffs and cuts to county services.

Lawmakers, however, hope that by forcing counties — which may be granted greater taxing authority to cover the costs — and school boards — which negotiate with teachers over benefits — to work more closely together, the two will get better at controlling costs.

That, of course, is being watched warily by the state’s powerful teachers’ lobby, which has demanded that any shift of pension costs come with a guarantee that counties can’t use the added expense to reduce funding for teachers’ salaries and benefits.

According to the Maryland Education Department, the average teacher salary for the 2011-12 school year is $63,634. In Montgomery County, the average is $73,705, the second highest in the state after Calvert County. In Prince George’s County, it’s $64,200.

The Maryland State Education Association maintains that along with any pension shift, a larger overhaul of a state formula that governs counties’ education funding is needed. They want to make sure counties are penalized if they don’t at least maintain year-over-year funding for classrooms.

“We have this whole premise of wanting equality and quality in education,” said Del. John L. Bohanan Jr. (D-St. Mary’s), acknowledging the many forces at play in this year’s debate, including the state’s four-year run atop Education Week magazine’s ranking of the nation’s best schools.

“It’s sacrosanct at this point. We don’t want to lose it. So how do you, literally, balance your budget, maintain the No. 1 ranking, and yet, from the state’s perspective, you cannot do that if the counties don’t keep up with us in their funding,” said Bohanan, chairman of the House of Delegates’ subcommittee on education spending.

“We cannot afford to continue going like we’re going . . . with [the state] carrying all the water.”

County leaders bristle at such characterizations.

County councils, school boards and employee unions have come together to oppose any pension shift.

The group, under the banner “Stop the Shift,” has launched a social media campaign informing residents about the plan to require local governments to pay a significant portion of pension costs. Voters are asked to contact their state representatives to oppose the plan. So far, more than 1,000 people have e-mailed state lawmakers. Over the past several weeks, county officials have held news conferences across the state, painting bleak pictures of their future. They have predicted fewer police officers, larger class sizes and a decrease in county services.

“The solution to this problem cannot be to simply pass the buck to our county citizens and students,” Montgomery’s Board of Education said recently in a statement.

Under O’Malley’s proposal, counties would have paid half of the combined cost of Social Security, which they currently cover, and teacher retirement costs, which the state covers.

In the first year, the net effect would have been an increase of $239 million in new costs to counties, although O’Malley contended that the burden would have been offset entirely in the first year by other provisions in his budget.

Under the Senate plan, the total cost to counties next year would be about $69 million. The costs would increase annually, peaking after four years, when counties would be fully responsible for normal pension costs, or those in a given year to cover their outstanding and future retirees.

For Montgomery, the Senate plan would lower the bill from $47 million under O’Malley’s plan to $14 million in the budget year beginning in July.

For Prince George’s, the cost would drop from $34 million to $10 million.

But either scenario would still add red ink to counties, both of which already face projected shortfalls of well over $100 million.

The Senate’s plan also would rewrite a law that makes increased state aid contingent on local governments maintaining a constant level of per-pupil funding.

In recent years, the downturn made it difficult for some local governments to maintain those mandated levels of school spending.

The Montgomery County County Council, which increased local funding to schools by hundreds of millions of dollars in the 1990s, applied for waivers from the law for two years in a row so it could lower per-pupil funding amid declining revenue. The request was denied the first year and granted the second year. Last year, it withdrew its waiver request and unilaterally reset its funding level to a lower amount to help balance the county budget.

The council’s decision, and similar moves across the state, upset school boards and teachers unions, who urged state lawmakers to fix what they call loopholes in the law.

In response, a proposal from House lawmakers released last week would make it mandatory — not optional — for local governments to seek a waiver if they can’t make minimum payments. The bill would allow localities to go beyond existing caps on property or income tax rates to raise money for schools, and it would permit the state to seize local income tax dollars and redirect them to the school budget if counties fail to pay their share without a waiver.

Elements of the plan appear to have been incorporated into the Senate proposal.

“This is what is necessary to protect local education,” said Sean Johnson, director of political and legislative affairs for the Maryland State Education Association, which represents 70,000 school employees. “It’s not by accident that we have No. 1 public schools,” Johnson said. “The funding commitments have made this a significant reason why.”

Staff writer Victor Zapana contributed to this report.