The legislature’s approval Thursday of a $52 billion road repair plan couldn’t come too soon for rain-battered streets and highways that have already suffered severe damage this year.

Since the beginning of the year, California’s state highway system has been buffeted with more than 400 sinkholes, downed trees, and mudslides. Caltrans puts the price tag for all this wet weather damage at roughly $866 million. That means 2017 — just three months in — is already the most expensive year for California’s state road system in at least two decades.

“It’s a disaster out there,” said Rob Lapsley, president of the California Business Roundtable. “If we don’t have the ability to move goods and trade—we’re the largest trade state—then obviously that directly impacts our overall economy.”

With additional snow melt still to come and the possibility of more weather damage in the months ahead, Caltrans is likely to see well over $1 billion in emergency road repairs and restorations before the year is out. That figure does not include the costs borne by city and county transportation and public works departments, which manage roughly 80 percent of the state’s roadways.

For state Democrats, this budget buster of a rainy season came at a politically opportune moment. On Thursday, with a strong push from Gov. Jerry Brown, the legislature approved a landmark spending plan that will raise $52 billion for road repairs in the coming decade with a spending package that includes a 12-cent gas tax and higher vehicle fees.

Though lawmakers failed to wrangle sufficient support for a similar package last year, the Democratic leadership was able to make use of the supermajority it acquired in last year’s election.

The vote to approve the tax increase required support from two-thirds of the legislature and Democrats had no vote to spare. In the Senate, Democrats won the minimum 27 votes after Sen Steve Glazer (D-Orinda) opposed the plan and Sen Anthony Cannella (R-Ceres) joined Democrats in support. In the Assembly, Democrats won the minimum votes necessary for approval after losing support from one of their members, Assemblyman Rudy Salas (D-Bakersfield).

“The rain has exacerbated—but it’s also really illustrated—the vulnerability of these poor streets and roads throughout the state,” said Amy Worth, a commissioner for the Bay Area Metropolitan Transportation Commission and a council member for the City of Orinda, in a conversation prior to the vote. “The silver lining of the storm will hopefully provide the energy to push this (vote) over the line.”

The cost of providing emergency fixes to the state highway system has been on an upward trend for the last few years. In contrast to this year’s storm-induced damages, the $660 million bill from 2016 was largely the result of fire and the clearing of trees killed by the drought. But this year’s storm costs could be worse than they otherwise would be thanks to years of neglect. Pockmarked, low-quality pavement degrades at an escalating rate and small potholes beget larger potholes.

“The storms put the consequences of years of deferred maintenance and underinvestment on stark display,” said Caltrans spokesperson, Vanessa Wiseman, in an email.

The governor and the leadership in the legislature have been campaigning for the package at meetings across the state, portraying the bill as a common sense choice to pay now rather than pay more later.

“The Democratic Party is the party of doing things and tonight we did something to fix the roads of California,” Brown declared after the vote.

By all accounts, there’s a lot of fixing to be done.

According to a Senate analysis, Caltrans would need an additional $6 billion each year to properly maintain and operate the state highway system. At the local level, cities and counties would need another $7.2 billion to bring their streets and roads back up to working order. That adds up to $132 billion over the next 10 years.

Though few lawmakers disagree that the state’s transportation infrastructure has been neglected, opinions differ over where to place the blame.

Supporters of the spending package point to a chronic shortage of revenue. The lion’s share of the money used to pay for state road repair and maintenance comes from taxes levied on gasoline and diesel fuel purchases. But the base excise tax—the portion of the tax that does not rise and fall with the price of gasoline—hasn’t been increased since 1994. Since then, inflation has eaten away 40 percent of its real value. In the meantime, many Californians have opted for more fuel efficient cars, meaning that the average driver now pays significantly less while delivering the same amount of wear and tear to the roads.

State Republicans place blame for the transportation woes on the state’s own misguided spending priorities. Assemblyman Vince Fong (R-Bakersfield) had introduced an alternative bill to the Democratic plan, which he says would have raised money by cutting wasteful spending, auditing major projects like high speed rail, and streamlining repairs and upgrades by reining in environmental regulations and making more use of private contractors.

Whatever the cause of the state’s increasingly shoddy network of roads, the result has been a higher burden on local and county governments, which have had to pay for maintenance and repairs out of their own budgets.

“The share of the burden borne on the shoulders of local funding has been growing for a generation,” said John Goodwin, a spokesperson for the Bay Area Metropolitan Transportation Commission.

According to Caltrans, the three counties that saw the most severe damage to the state-owned highway systems were all in the Bay Area—Marin, Santa Clara, and San Mateo. Though local and county roads were similarly affected, the region has passed local sales tax initiatives to keep up with some of the repair. That’s fortunate, says Goodwin, since repairing a moderately damaged pavement is five to 10 times cheaper than replacing it.

“By putting more local money in, (we) have been able to tread water in terms of pavement quality,” said Goodwin. “But you can only tread water for so long.”

But even with with the support of the governor, organized labor, business groups, city and county representatives, and transit advocates, the Thursday vote was a “big lift,” according to the governor. Asking Californians to pay more for the privilege to drive is not generally a winning political strategy. The last time the state decided to raise the gas tax, George Deukmejian was the governor. Former Gov. Gray Davis’ decision to raise the vehicle license fee helped fuel the successful campaign to recall him. Even with super-majorities in the Senate and the Assembly, many moderate Democrats who won their seats by narrow margins were not eager to support a tax hike within their first few months in office.

But the sorry conditions of the state’s roads and the resulting vehicular damage and congestion that it causes raised the stakes for a tax hike.

At a Senate hearing early last month, Sen. Jim Beall (D-San Jose) recalled how even he had fallen victim to the state’s ravaged road system.

“The week after my election when I took my wife on a trip to the beach, it was ruined by my car falling apart because I hit a big, huge pothole,” he told the Senate Governance and Finance Committee. “Isn’t that a lovely present for somebody who just got elected?”