State lawmakers approved a $139 billion budget Thursday that uses California's massive surplus to boost funding for homeless programs, welfare, child care, and universities while also socking some money into savings.

The budget, which boosts spending 9 percent for the fiscal year beginning July 1, was approved with support mainly from Democrats.

"We've done something pretty great for people in California," said Sen. Connie Leyva, a Democrat from Chino, Calif., in the Inland Empire.

The spending plan was negotiated by Democrats Gov. Jerry Brown, Senate President Pro Tem Toni Atkins of San Diego, and Assembly Speaker Anthony Rendon of Lakewood, Calif.

California is riding a wave of economic growth that has produced the largest surplus since at least 2000. Even the most conservative forecast pegs the surplus at nearly $9 billion.

Lawmakers and Governor Brown are using that windfall to fill the rainy day fund to the maximum allowed under the state constitution and boost other savings, producing $16 billion in total reserves. Nearly $14 billion of that will be in the rainy day fund, which can only be spent during a budget emergency caused by a natural disaster or decline in revenue.

Republicans praised the focus on savings but said the budget doesn't do enough to pay down debt and irresponsibly increases long-term commitments that will hamstring the state in the future. Sen. John Moorlach, a Republican from Costa Mesa, Calif., in Orange County, said the state isn't doing enough to address growing obligations for pensions and retiree health care.

"In a year when one enjoys a bumper crop, one must set aside cash and pay down the credit card balance," Senator Moorlach said. "We've got to get ahead of this mess."

The budget will boost assistance for people living in poverty, including more than 13,000 new slots for subsidized child care. People on CalWorks, the state welfare program, will see monthly grants rise by 10 percent in April, the start of a multiyear effort to lift the income of the poorest Californians to 50 percent of the federal poverty level. Advocates said the boost would ensure children aren't living in deep poverty, which harms their brain development and hinders future performance in school and work.

It includes $500 million for emergency grants to help cities and counties reduce homelessness. The grants can be used on a range of programs, including housing vouchers and shelter construction to help address California's rapidly rising costs and growing homeless population.

The budget also boosts university funding, forestalling tuition increases at both California State University and University of California, and creates an online community college to offer credentials to working adults unable to attend classes in person. Brown's administration announced that the first program will offer a credential in medical billing and coding.

The deal left out an expansion of Medi-Cal health care coverage to young immigrants living in the country illegally and financial assistance for people who buy their own insurance in the individual market.

California's nearly $200 billion total budget includes $138.6 billion in general fund spending, $57.1 billion in special funds that must be spent for specific purposes and $3.9 billion in money from bonds.

As part of the budget negotiations, Brown and lawmakers agreed to allow victims of a notorious California serial killer to get a renewed chance to seek compensation for their emotional trauma or financial losses. Normally, victims have just three years to file with the California Victim Compensation Board for crimes, but the legislation would open a new window for victims to file claims after former police officer Joseph DeAngelo was charged in the Golden State Killer case.

Get the Monitor Stories you care about delivered to your inbox. By signing up, you agree to our Privacy Policy

Lawmakers also approved funding to rebuild the state Capitol annex, which is attached to the historic Capitol and houses most of the offices for Brown, lawmakers, and their staffs. Supporters said the aging building is in disrepair and is hazardous for visitors to navigate, but critics said the more than $700 million planned for the project could be better spent elsewhere.

This story was reported by The Associated Press.