TURLOCK, Calif. (AP) — California Gov. Gavin Newsom has proposed a $322 billion budget without a deficit, a welcome change after two years of significant budget shortfalls in the nation’s most populous state.

But the budget Newsom announced Monday is mostly a placeholder as California waits to see if incoming President Donald Trump will follow through on threats to revoke billions in federal dollars, which could force lawmakers to make painful cuts to essential programs. About a third of California’s budget relies on funding from the federal government, including tens of billions of dollars to provide health care services. Trump takes office on Jan. 20, and Newsom must sign the final budget by the end of June.

California lawmakers already opened a special session to consider giving a fresh $25 million to Attorney General Rob Bonta’s office to defend against or take on potential legal challenges from the Trump administration. Fights are likely between California and Washington, D.C., over climate policy and immigrant rights. State senators have also proposed additional funding to provide free legal services to immigrant communities.

Finding a way to balance the budget in the face of potential federal funding losses will be a major test for Newsom, who is entering the last two years of his last term and continues to be seen as a future presidential contender.

One project that could be at risk is the state’s high-speed rail project, which would eventually carry passengers between Los Angeles and San Francisco but is woefully underfunded and behind schedule. Trump cancelled nearly $1 billion in federal funding during his first term in 2019, and several Republican Congress members are already taking aims at the project over its costs. President Joe Biden later restored the federal dollars allotted to it.

Perhaps anticipating a challenge, Newsom also traveled Monday to a construction site for the project to highlight progress including obtaining all environmental permits needed for building.

“This is not just a transportation project. This is a transformation project,” Newsom said. “To the cynics that are filled with cynicism, that stand on the sidelines and don’t engage, we’re here making this work.”

On the budget, Newsom gave few details about the proposed spending but boasted of progress on issues where the state has faced criticism, including investment on education and infrastructure and efforts to solve the homelessness crisis. The Democratic governor said he’s optimistic about the state’s future despite the uncertainties ahead.

“We’re also walking into headwinds, a radically different moment in U.S. history,” he said. “We need to be prepared.”

Newsom’s administration plans to provide more details on the budget proposal before Friday’s deadline to present it to lawmakers. Newsom announced the numbers early before heading out of state for former President Jimmy Carter’s funeral services.

Newsom said he’s proposing little new spending, but the budget does allow the state to fully implement the country’s first universal transitional kindergarten program, which would make such school free for some 400,000 4-year-olds throughout California. That’s an effort Newsom has championed since 2021. His plan also includes increasing the state’s film and TV tax credit to $750 million annually to bring back Hollywood jobs that have gone to New York and Georgia.

He said good planning in the last budget allowed the state to avoid a major shortfall this year.

“Last year, we endeavored to make this year’s budget a nonevent,” he said.

The governor’s office also estimates tax revenues for this year are $16.5 billion above projections, thanks to the booming stock market and rapid income growth for high-income Californians.

That has helped the state weather the sluggish economy with limited job growth and ongoing weak consumer spending.

California’s economy is the fifth-largest in the world. Last year the state faced an estimated $46.8 billion budget deficit and in the year before, a $32 billion budget shortfall. The state also saved $1.2 billion over two years by eliminating roughly 6,500 vacant positions in state departments and another $3.5 billion from cutting travel budgets and modernizing IT systems, Newsom said.

Still, such deficits have forced the state to pare back or delay some of its progressive policies that were fueled by record-breaking surpluses during the COVID-19 pandemic.

Unlike most states, California taxes capital gains — mostly money made from investments and stocks — at the same rate as money made from wages and salaries. The result is nearly half of the state’s income tax collections comes from only 1% of the population. That has led to unpredictable, large swings in revenue in California’s budget.

Republican state Sen. Roger Niello, who sits on the budget committee, said the governor failed to provide a plan to help address future budget deficits. In November, the nonpartisan Legislative Analyst’s Office warned the state could face double-digit shortfalls in the next few years.

“We’re looking at $20 to $30 billion deficits, and unless we start doing something to address that now, it’s going to become very difficult,” Niello said in an interview.

Newsom said Monday that he supports efforts to grow the state’s rainy day fund but acknowledged it would be a “herculean effort.”