SACRAMENTO, Calif. (AP) — Gov. Jerry Brown and Democratic legislative leaders agreed to spend $500 million to combat homelessness and $90 million to increase grants for people on welfare as part of a $139 billion budget compromise released Friday.

The deal left out an expansion of Medi-Cal health care coverage to young immigrants living in the country illegally and tax credits to help people who buy their own insurance to afford coverage. Both were top priorities for Assembly Democrats looking to reduce the ranks of the uninsured.

Brown, a Democrat, reached the deal with Assembly Speaker Anthony Rendon, D-Paramount, and Senate President Pro Tem Toni Atkins, D-San Diego.

The deal is worth about $1 billion more than Brown's $137.6 billion general fund proposal last month.

"After detailed discussions, California is on the verge of having another on-time, balanced budget," Brown said. "From a $27 billion deficit in 2011, the state now enjoys a healthy surplus and a solid Rainy Day Fund."

Economists estimate California has the largest budget surplus in decades, with estimates ranging from $8.8 billion to more than $11 billion. Brown has generally resisted new ongoing spending commitments that he says the state won't be able to afford in a future recession, noting California's revenue is extremely volatile due to its reliance on the income and capital gains of the wealthy.

He prefers using new money for reserves or one-time commitments that don't carry a long-term cost. The budget deal maxes out the state's Rainy Day fund at roughly $14 billion and includes an additional $2.2 billion in state reserves.

Democratic leaders couldn't convince him to back their proposals to expand Medi-Cal and provide tax credits for people who buy their own health coverage. He agreed only to $5 million for a task force to study single-payer health care.

Frustrated health care advocates say the state is leaving behind immigrants and people struggling with health care costs.

"California's elected leaders are missing in action," Anthony Wright said, executive director of Health Access, an advocacy group.

Universities will see a boost in funding even beyond the $92 million Brown initially proposed for each of the two big higher education systems. California State University will get $105 million in new ongoing funding and $167 million in one-time funds on top of Brown's opening proposal. University of California will get $5 million in ongoing money and $177 million of one-time funds.

The funding will allow Cal State to enroll students and help them graduate on time by offering more classes, faculty, advisers and technology, Chancellor Timothy White said in a statement.

"This is vital to our state's future," White said.

The increased funding would allow the UC system to put off raising tuition, UC president's office spokeswoman Dianne Klein said. White said in April that the CSU system will not raise tuition for the 2018-19 academic year.

The compromise also includes $500 million in one-time spending on emergency grants to help cities and counties reduce homelessness as the state deals with surging numbers of homeless people on the streets of its major cities. The grants can be used on a range of programs, including housing vouchers and shelter construction.

People on CalWorks, the state welfare program, would 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 say the boost would ensure children aren't living in deep poverty, which harms their brain development and hinders future performance in school and work.

Once fully phased in at a cost of $1.5 billion per year, the grants would return to pre-Great Recession levels.

"No single budget can capture all the opportunities California has, or meet all the challenges we face — but the smart and sensible choices in this budget absolutely move California closer to where we want and need to be," Rendon said.

The Assembly and Senate face a June 15 deadline to approve the deal.

___

Associated Press writer Sophia Bollag contributed.