Assemblyman Kevin Jeffries, left, signs a copy of the budget vote for Assembly Speaker John Perez, right, after the Assembly passed the 2012-13 spending plan on a 50-25 at the Capitol in Sacramento in June. The state of California faces just a $1.9 billion budget gap next year.

Assemblyman Kevin Jeffries, left, signs a copy of the budget vote for Assembly Speaker John Perez, right, after the Assembly passed the 2012-13 spending plan on a 50-25 at the Capitol in Sacramento in June.

California Gov. Jerry Brown discusses various topics including the passing of Proposition 30 during a news conference, Wednesday, Nov. 7, 2012 in Sacramento, Calif. California Gov. Jerry Brown is delivering on a campaign promise he made two years ago to fix California's perpetual budget deficits and raise taxes to do it only if voters agreed. Brown says voters put their trust in his plan during Tuesday's election by approving Proposition 30. (AP Photo/The Sacramento Bee, Randy Pench) MAGS OUT; LOCAL TV OUT (KCRA3, KXTV10, KOVR13, KUVS19, KMAZ31, KTXL40); MANDATORY CREDIT less

California Gov. Jerry Brown discusses various topics including the passing of Proposition 30 during a news conference, Wednesday, Nov. 7, 2012 in Sacramento, Calif. California Gov. Jerry Brown is delivering on ... more

Photo: Randy Pench, Associated Press

Image 3 of 4

California State Assembly members, including Assembly Speaker John Perez, right, watch the results of voting on the state's budget at the State Capitol in Sacramento, California, on Friday, June 15, 2012. (Randall Benton/Sacramento Bee/MCT)

California State Assembly members, including Assembly Speaker John Perez, right, watch the results of voting on the state's budget at the State Capitol in Sacramento, California, on Friday, June 15, 2012.

California appears finally to be waking up from its long budget nightmare.

After years of double-digit deficits, the state will face just a $1.9 billion budget gap next year, according to the Legislative Analyst's Office. Projections for future years show billions of dollars in surpluses.

The legislative analyst, Mac Taylor, called the situation a "dramatic turnaround" for the state, though he cautioned lawmakers to build a reserve and pay off other debts before spending heavily on services.

"But, definitely, this is a much, much more positive situation than we've faced in many, many years. On the whole it's pretty good news," Taylor said.

The state this year will spend $94 billion in general fund services, which include public education, colleges and universities, prisons, and health and human services, according to Taylor.

The annual fiscal outlook released by the analyst Wednesday is based on the general fund and showed a sharp drop from what California confronted just a year ago, when Taylor pegged the problem at $13 billion. The year before that it was a $25.4 billion hole.

At its peak in February 2009, California's deficit hit $42 billion.

Taylor's report is the official start to the budget season at the Capitol. Gov. Jerry Brown will make his own budget proposal - including his estimate of the state's deficit - in January. Lawmakers will then have until mid-June to pass a spending plan for the fiscal year that begins July 1.

Why the turnaround?

Key factors in the turnaround are the improving state economy, prior budget cuts and the passage of the Proposition 30 tax measure, Taylor found. By 2014, the state will have a surplus of $1 billion and that will grow to more than $9 billion by 2017, according to the fiscal outlook.

That means what is known as the "structural deficit" - the carryover deficit from year to year - will be eliminated.

The budget deficit is a combination of the shortfall for the current fiscal year - $948 million - plus a projected difference of $936 million between expenditures and revenues in the fiscal year starting July 1.

That deficit is due mainly to cities and counties not turning over as much money as was expected from the wind-down of redevelopment agencies. That money is sent to school districts and other local entities, reducing the amount the state has to spend on schools.

Brown's budget projected $3.2 billion in savings from that, but the analyst projects it will come in at $1.4 billion. Also, the budget anticipated $1.9 billion in profit from sales of shares of Facebook, but Taylor said that is likely to be $1.2 billion.

Other higher-than-projected costs, along with a $1.4 billion upward adjustment of revenues from a past year, added together to result in the final deficit number.

But a number of assumptions also are made that keep the deficit from being larger, including that the state's economy continues to grow, that the federal government doesn't go over the so-called "fiscal cliff" of tax increases and spending cuts, that there is no large rainy-day fund and that there are no cost-of-living adjustments for most state programs.

In addition, the report does not address the state's looming costs for retirement-related programs.

Governor weighs in

Brown praised the fiscal analysis.

"This report validates the hard work the state has done to cut its deficit and balance its budget over the long term. California is now on the path for a fair and sustainable budget as long as we continue to exercise fiscal discipline and pay down debt," he said in a statement.

Holding the line on spending will be challenging given the cuts Democrats reluctantly have made to state services. Many already have named specific cuts they want to restore next year, and they'll have the ability to do that now that they have a supermajority in both houses of the Legislature.

Democrats were waiting for the outcome of an Assembly race to confirm the supermajority, and on Wednesday Republican Assemblyman Chris Norby, R-Fullerton (Orange County), conceded that he had been upset by Democrat Sharon Quirk-Silva.

Past budget projections

California's leaders get an annual report every November on how healthy the state's finances are expected to be through the next 20 months. For years, the news from the Legislative Analyst's Office has been dire, as it has projected double-digit budget deficits. This year marked the first since 2006 that the projected deficit dropped to a single digit. LAO's recent projections: