SACRAMENTO, Calif. (AP) — Lt. Gov. Gavin Newsom has far outraised his rivals from both parties in the race for California governor with more money available to spend than all his rivals from both parties combined ahead of the June 5 primary.

Cash is critical to the candidates’ ability to get their message out and sway voters, particularly in a sprawling state with a population approaching 40 million and some of the most expensive media markets in the country.

READ MORE: UPDATE: Streets Flood in San Rafael, Mill Valley as Wild Storm Lashes Bay Area

Newsom, a Democrat and former San Francisco Mayor, had nearly $17 million in the bank at the end of last year, according to his campaign finance report filed Wednesday. He has another $3 million left from a prior campaign, some of which he can use in his bid for governor.

His main Democratic rivals, former Los Angeles Mayor Antonio Villaraigosa and state Treasurer John Chiang, had just under $6 million each, though Chiang had $3.2 million left from his last campaign. Former state schools chief Delaine Eastin, also a Democrat, had just $184,000.

San Diego businessman John Cox led the Republicans with just under $2 million socked away. Assemblyman Travis Allen was in debt, with $136,000 in cash and more than $340,000 in unpaid bills. Former Congressman Doug Ose jumped in the race in January, so he did not have to file a year-end fundraising report.

READ MORE: UPDATE: Atmospheric River Crashes Onshore; Flood Warning Issued For Napa, Sonoma Counties

Chiang spent nearly every dollar he raised in the second half of 2017, ending the year up just $50,000 from his position on June 30. He shook up his campaign earlier this year with new staff and consultants.

Newsom spent a quarter of the $4.6 million he raised in the latter half of the year, while Villaraigosa spent about the third of the $2.1 million he raised during the period.

The reports show money collected and spent through the end of 2017. Any spending in January, such as a television ad Cox aired on Fox News before the State of the Union, is not reflected.

The top two candidates in the primary, regardless of party, will advance to the general election, a structure that could lead to two Democratic candidates facing off in November.

MORE NEWS: Wentz Leads Colts to Rain-Soaked 30-18 Win Over 49ers

© Copyright 2018 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.