(CNN) -- Both chambers of the California legislature ended a nearly 100-day fiscal standoff early Friday, approving an $87.5 billion budget package.
The budget, which cuts spending in a number of areas and makes long-term changes in state pensions, is designed to close a $19 billion deficit.
It now moves to GOP Gov. Arnold Schwarzenegger's desk to be signed into law.
Assembly Speaker John Perez, a Los Angeles Democrat, said the compromise plan was "not a perfect budget," but it reflected "the compromises necessary" to reach the required two-thirds legislative majority.
Among other things, aid to education was cut by over $3 billion for the current year. Legislators have promised that nearly $2 billion of those cuts will be restored next year.
Observers noted, however, that the state still faces severe long-term financial problems and is threatened with another near-certain deficit next year. California's recurring fiscal woes have been a dominant theme in the race to replace Schwarzenegger, whose term is drawing to a close.
California has been in a budget crisis since this summer. The state budget was supposed to have been approved by mid-June, two weeks before the new fiscal year began on July 1.
The money crunch has caused Sacramento to put some state workers on furlough and contemplate deferring payment to thousands more.
CNN's Erica Henry contributed to this report