Updated

The budget questions that sent Alaska lawmakers into special session this year had nothing to do with austerity measures or disagreements over cuts to state agencies or programs.

They just couldn't agree on what to do with all that extra money.

Resource-rich Alaska took in nearly $1.9 billion more than expected last fiscal year thanks largely to high oil prices and ended the fiscal year with an estimated $260 million surplus, an amount equal to nearly 4 percent of its general fund.

A handful of states — led by those that enjoy bountiful energy reserves such as West Virginia, Wyoming and North Dakota — have found themselves in similarly enviable positions, oases of optimism in an otherwise barren landscape of budget cuts and government layoffs. A few other states, including Massachusetts, South Carolina and Virginia, have combined slight increases in tax revenue with tight spending controls to produce modest surpluses.

In West Virginia, the surplus is going toward reserves, pension programs and debt. Wyoming put much of the extra money into savings after years of investing heavily in roads and schools.

And in North Dakota, which is experiencing an energy boom similar to the one Wyoming went through several years ago, investments included an extra $370 million for road repair and construction, especially in the oil-producing western part of the state. Some $340 million will go to schools over the next two years to help reduce property taxes, while $22 million will go toward a disaster relief fund for a state that has been inundated with floods in recent years.

At the same time they are saving and investing, North Dakota and West Virginia are reducing their corporate income tax rates, a move that could make them even more attractive to certain businesses.

Unemployment in the many of the states running surpluses has been well below the national jobless rate of 9.1 percent. North Dakota's rate, for example, was 3.5 percent in September.

"I don't think you can say we're out of the woods," Alaska labor department economist Neal Fried said. "We were never in the woods."

A yearlong review of fiscal and economic data in all 50 states by The Associated Press found 15 states with budget surpluses as they headed into the current fiscal year. They ranged from Mississippi, where the $6.6 million surplus represented less than 1 percent of general fund spending, to Wyoming, where the $437 million surplus was equivalent to 28 percent of the state's general fund.

Massachusetts has benefited from stronger-than-anticipated revenue from capital gains taxes to build a surplus of just more than 1 percent of its general fund budget. It used nearly three-quarters of the $460 million surplus to replenish the state's reserve fund, while directing other surplus money to cities and towns recovering from deadly tornadoes in June, state courts and to provide modest raises to social service workers.

Most states have not been so fortunate.

They continue to feel the effects of a recession that has led to steep declines in state and local tax revenue, with 23 states having to make budget cuts during the last fiscal year, according to the National Association of State Budget Officers.

In Washington state, for example, the Legislature is preparing for a special session to address a $2 billion, mid-year deficit. The state's Democratic governor has proposed eliminating the state's health care program for the poor and a medical program for disabled adults. Lower than expected tax revenue in California means that state is likely headed for deeper cuts to social services and higher education.

Even in Alaska, officials are grappling with how to reverse a decades-long trend of declining oil production and face a future of reduced federal aid as Congress seeks to clamp down on spending, rising Medicaid costs and $11 billion in unfunded pension liabilities. Gov. Sean Parnell acknowledged this in making record cuts to an infrastructure spending bill passed by lawmakers last spring.

Yet even with those reductions, the state wound up with a $2.8 billion public works package, the same as the year before — a spending level Parnell deemed "healthy."

Among the state's priorities is investing in new roads, schools and energy projects that could help make the delivery of heat, electricity and fuel more reliable and affordable.

Alaska also is putting $66 million toward pursuing what would be the largest dam built in the U.S. in decades. Officials say the $4.5 billion, 700-foot high Susitna River dam would help meet Alaska's goal of getting half its electricity from renewable energy sources by 2025, plus help meet the energy demands of the state's most populous region.

The state also plans to spend money on transportation projects and upgrades to school buildings, including contributing about one-third the cost of a $109 million arena at the University of Alaska Anchorage. At the same time, Alaska is building the nation's largest rainy day fund at $14 billion, an amount that is roughly double the state's entire general fund.

The governor and legislative leaders also have set aside $400 million that could serve as an endowment for college scholarships.

Juneau resident Teddy Castillo said such a program would be a huge help to her family. One daughter will graduate high school next year and another is a high school freshman.

"I think it's just awesome to have that opportunity available for them," Castillo said.

In West Virginia, the worldwide demand for coal and a conservative approach to government spending have kept the state's finances in the black.

Instead of expanding programs, lawmakers and governors have devoted about $1 billion that was left unspent between 2004 and 2008 toward public pension programs and other debts. Most of that money eased a shortfall in the main retirement fund for teachers.

But one consequence of the state's tight-fisted approach has been government on the cheap: West Virginia ranks low for teacher and public employee wages despite several rounds of pay raises and has among the most restrictive eligibility requirements for Medicaid.

"If you're a mom with two children and you earn more than $6,500 a year, you're not eligible," said Perry Bryant, executive director of West Virginians For Affordable Health Care. "If you're childless, you don't qualify even if you're penniless."

In Wyoming, which gets most of its money from taxes on gas, coal and oil production, investments this year included $45 million in additional highway money and $15 million to try to attract large computing centers to the state. The state also has a scholarship fund for high school students, similar to what Alaska is establishing.

Republican state Sen. Phil Nicholas doesn't take Wyoming's energy wealth for granted. He remembers seeing how the state went from facing a $500 million shortfall in the late 1990s to being flush with cash thanks to the energy boom that started about 10 years ago.

While energy production generates more tax revenue, it also can lead to higher ozone levels and other negative consequences.

"Recognizing that price, though, Wyoming and our communities are significantly dressed up, if you will," said Nicholas, chairman of the Senate Appropriations Committee.

He said every town in the state has nicer schools, better parks and other amenities than existed before.

"You'd be hard-pressed to go to any community in this state that has not benefited significantly," he said.

___

Associated Press writers Lawrence Messina in Charleston, W.V., Ben Neary in Cheyenne, Wyo., Bob Salsberg in Boston and Dale Wetzel in Bismarck, N.D., contributed to this report.