Legislators in a handful of oil-rich states are struggling to do the seemingly impossible as the 2016 fiscal year draws to a close this week: balancing their budgets, as required by law, despite massive declines in revenues due to falling oil prices. The National Conference of State Legislatures says nearly a dozen states still had not enacted budgets for the new fiscal year as of mid-June. Some — including oil states Louisiana and Alaska — are facing a full-blown budget crisis. Even after painful cuts, budget gaps in those two states alone total nearly $4 billion. The low oil prices that are roiling state capitals could also shake up CNBC's 10th annual America's Top States for Business rankings, where our Economy category considers factors like economic growth, job growth and state fiscal conditions. (See our methodology here.) These are some of the states that could find their economies and their rankings oil-rigged in 2016.

Alaska: Fiscal frontier

When Sarah Palin was the governor of Alaska and North Slope crude oil was reaching its all-time record price of around $144 in July of 2008 — just as she was being named the GOP vice presidential nominee — the chant seemed like a no-brainer: "Drill baby, drill!" Back then, Alaska was relying on oil for roughly 90 percent of state revenue. The more the oil companies pumped, the more tax money the state would receive, and the smarter state politicians would look. But in reality, the toughest challenge would belong to Palin's most recent successor, Independent Gov. Bill Walker, who took office at the end of 2014. Oil prices were weeks away from hitting an all-time low back then. They have since rebounded a bit but are still roughly two-thirds below their peak, at around $48 a barrel. Walker began this year's legislative session looking at a $4.1 billion budget deficit. It took five months, including the regular legislative session and a special session called by the governor, but the Alaska legislature finally passed a budget in June. They were able to pare the budget deficit down to $3.2 billion, but even that amount would nearly deplete the state's rainy day fund. So Walker has thus far held off on signing the budget into law and has called the legislature back for a second special session, beginning July 11.

The governor wants legislators to pass his deficit-reduction package, which includes reinstating the state income tax and overhauling the state's $50 billion so-called Permanent Fund, which pays the annual dividends every Alaskan receives, representing their share of the state's cumulative oil wealth. Walker has until June 30 to sign the budget into law. If he does sign it, he can veto portions of the bill — for example, eliminating Permanent Fund dividends entirely — to force legislators into action when they return in July. So far, Walker is playing his cards close to the vest. But he told CNBC in March that the status quo will no longer do. "What we have done as a state, we've said lets live off one commodity," he said. "So I say let's get off of this." Walker's plan — which would be considered an act of political suicide in any other year and may still prove to be one this year — involves turning the Permanent Fund into a sort of endowment that could help cushion this crisis and help solve others in the future. Last year those Permanent Fund dividend payments hit a record $2,072, meaning a family of five would collect a check of $10,360 just for living in Alaska. Under Walker's proposal, a portion of the fund's earnings would go toward deficit reduction, cutting dividend payments roughly in half for the foreseeable future. Competing proposals by Republicans, which Walker says do not go far enough, would trim the dividend, but not by as much. Republicans also want to eliminate or delay Walker's proposed income tax. Democrats, meanwhile, say more of the burden should fall on the oil industry—something the industry naturally opposes.

Texas: Big oil, big challenges

Texas has never finished below second place in our annual Top States for Business rankings, and it took the top spot three times — in 2008, 2010 and 2012. Each time, the domestic oil and natural gas boom has been a major factor in Texas' success. , big time. Remarkably, unlike most oil states, the Texas economy is still growing. State GDP rose 3.8 percent in 2015, with gains in construction and information offsetting deep declines in mining and oil drilling. In fact, the U.S. Bureau of Economic Analysis says Texas matched the growth rate in 2014. Many economists worried that the state was in for a recession along the lines of the oil shock of the 1980s, when real estate prices plunged and unemployment soared. That oil crisis was longer and deeper than the current one—at least as of now. Still, many analysts say efforts after the oil shock to insulate the economy from future crises may have paid off. Texas now has a booming health care industry, as well as a host of tech companies that didn't even exist 40 years ago. "Texas has more economic diversity than it did in the last oil downturn," said Nick Samuels, a vice president and Senior Credit Officer at Moody's Investor Service. "Areas such as Austin, Dallas and San Antonio, who have very different economies, have mitigated the impact of low oil prices."



Scott Dalton | Bloomberg | Getty Images

Austin and San Antonio, in particular, have held themselves out as welcoming places for entrepreneurs, particularly in high tech. But that is not to say any of this has been easy — or is about to get any easier. Texas is in the middle of a two-year budget cycle. It took some painful cuts and some reorganization of state agencies to balance the budget, and Texas is one of only seven states — mostly oil-producing ones — that saw revenues decline last year, according to the National Association of State Budget Officers. Samuels said that while the state has among the largest budget reserves of any state, at a projected $10.4 billion by the middle of next year, continued low oil prices mean legislators will face some tough decisions when they return to Austin in January. "Texas is a growing state. There's demand for education and for transportation and for pension funding. And all of those issues the state will have to grapple with next year," Samuels said.

North Dakota: The boom fizzles

There is perhaps no place where the impact of falling oil prices is as stark as North Dakota. The state's oil production grew tenfold over the past decade as it built a thriving oil shale industry virtually from scratch, driving unemployment to a national low and filling government coffers with surging tax revenue. But the collapse in crude prices has turned the tide. Oil and gas exploration activity has plummeted, out-of-state workers have decamped, and the budget has swung from a surplus of more than $300 million last year to a $1 billion shortfall this year. "Unemployment is still low in the state (at 3.2 percent in May). There are still job opportunities. That's the positive thing going forward," said Allen Knudson, budget analyst and auditor for North Dakota's Legislative Council. But finding those opportunities is a lot more difficult than it was during the boom. In fact, the U.S. Bureau of Labor Statistics says the only sector to show year-over-year job growth as of May was education and health services. "The impact on sales tax from oil prices being down is really what's putting the pressure on the budget situation. Oil would make the biggest impact," Knudson said. "[WTI] oil prices probably need to be from $50 to $60 a barrel before things would turn around."

The number of rigs operating in North Dakota fell from just under 200 at the peak of exploration in 2014 to fewer than 30 today, according to the state's Department of Mineral Resources. The figures don't bode well for a state that depends on oil for more than half its revenues. And the situation is not improving. New estimates suggest revenues in May will have come up short again. Governor Jack Dalrymple had already ordered steep across-the-board cuts at state agencies, from health care to prisons, and tapped into the state's half-billion-dollar rainy day fund. The latest revenue shortfall could drain that fund entirely. The state's economy — which grew by a staggering 6 percent in 2014 — contracted by more than 2 percent last year. It seems that the North Dakota boom that had captivated the nation is now visible only in the rearview mirror.

Louisiana: Bayou blues

Louisiana is one of the most important oil-producing states in the nation, home to drillers that operate in shallow coastal waters, and to shipbuilders and support companies that contribute to oil operations in the deeper waters offshore. As the 2016 fiscal year comes to a close, first-term Governor John Bel Edwards and the state legislature have been in crisis mode, struggling to close a fiscal 2017 budget gap that could run as high $800 million — and that is after $485 million in emergency spending cuts this year. State revenues were down 2.6 percent this fiscal year, according to the National Association of State Budget Officers. They are forecast to be flat this year. Louisiana's mining and logging sector, an official category that includes oil and gas extraction, shed more than 12,000 employees last year, according to the U.S. Bureau of Labor Statistics. The manufacturing sector, highly exposed to the energy industry, lost nearly 7,000 jobs.