SACRAMENTO, Calif. (AP) — The Legislature passed California’s massive state spending plan Friday amid sharp divisions over whether the compromise struck by Democrats and Gov. Jerry Brown will further the state’s recovery or eventually return it to the multibillion-dollar deficits common during the recession.

Lawmakers had until midnight Saturday to send the governor a balanced budget for the fiscal year that begins in July, but they acted swiftly after the state’s top Democrats reached a deal earlier in the week. Both houses approved the main budget bill, AB110, on party-line votes: 28-10 in the Senate and 54-25 in the Assembly.

They will reconvene Saturday to vote on roughly 15 bills that will enact specific parts of the budget.

Senate leader Darrell Steinberg said the $96.3 billion Democratic spending plan ends the “doom-and-gloom” scenarios that were a hallmark of years past, when deficits grew into the double digits, state programs were eliminated, workers were furloughed and budget deadlines were blown by weeks and sometimes months.

“The passage of the budget may just represent the end of one very difficult era and the beginning of a new and better era — an era of economic growth, hope and restoration,” said Steinberg, a Democrat from Sacramento.

Republican lawmakers in both houses of the Legislature were less enthusiastic. They said the spending plan contained accounting gimmicks and failed to address some of the state’s most pressing fiscal time bombs, including tens of billions of dollars in unfunded public employee pension liabilities.

Republican Assemblyman Jeff Gorell also said it contains additional spending that will come back to hurt the state once the higher sales and income taxes passed by voters last fall expire.

“We will have to make cuts again,” said Gorell, of Camarillo. “With this budget, we have positioned ourselves perfectly to repeat the mistakes of the past.”

Thanks to a recent voter-approved initiative, Democrats could pass the budget on a simple majority vote and did not need Republicans’ support. Democrats noted the budget maintains a roughly $1 billion reserve and will not restore all the programs cut during the recession.

It also funnels significantly more money to K-12 schools and alters the education funding formula so more money will flow to districts with high levels of students who come from low-income families, who are not proficient in English or who are foster children. The funding shift was one of Brown’s top legislative priorities of the year.

The governor has said providing more money to help students who are disadvantaged is the right thing to do, and it was a part of the budget that drew rare bipartisan support in both houses.

Republican Assemblywoman Kristin Olsen, of Modesto, said the state’s current method for distributing money to schools has created “historic inequities” in lower-income areas such as the San Joaquin Valley.

The governor’s formula, she said, “seeks to give all kids, regardless of their socio-economic background, regardless of their ethnicity, regardless of their geography, equal access to a top-quality education so they can be successful in life.”

The budget also provides more money for welfare programs, mental health treatment, health care for the poor, the court system and higher education, although Democratic lawmakers said they did not get all the spending restorations they sought. That’s because the leadership agreed to go with the governor’s more conservative estimates of tax revenue in the coming fiscal year.

Many rank-and-file Democrats favor a revenue estimate offered by the nonpartisan Legislative Analyst’s Office, which was $3.2 billion higher. They hope to reopen the budget after the first of the year if revenue does indeed come in ahead of the governor’s estimate, but Brown has said he agreed to no such thing.

Among the objections raised by Republicans and even some Democratic lawmakers was a funding shift agreed to by the governor that transferred $500 million from an account funded by industry fines that is supposed to pay for the state’s efforts to reduce greenhouse gas emissions. The money instead is being lent to the state’s general fund.

Similar internal transfers from years past have left the state owing billions of dollars from its general fund to a variety of state accounts. Republicans said this budget makes too little headway in repaying that money and in addressing the state’s longer-term debts, primarily pensions and retiree health care obligations.

Republican Sen. Ted Gaines, of Rocklin, also noted that the state will be challenged to pay for the governor’s high-speed rail and water-delivery projects, which have a combined price tag approaching $100 billion.

Several Republicans noted that the budget was balanced largely because of temporary tax increases and that the Legislature will face the prospect of spending cuts once those expire.

The quarter-cent sales tax increase will last for four years, while the income tax hike on those making more than $250,000 a year will last for seven.

“I can prophetically tell you (the budget) will grow into unsupportable spending down the road because it’s built on the backs of high-income earners, and when you have that, you have a wildly fluctuating revenue source,” said Sen. Bob Huff, a Republican from Diamond Bar.