Despite an epic last-minute compromise brokered by Gov. Jerry Brown, state water regulators voted Wednesday to reallocate billions of gallons of San Joaquin River water from farms and cities to revive struggling fish populations.

After hours of testimony, the State Water Resources Control board voted to deliver hundreds of thousands of acre-feet of water from the San Joaquin watershed to salmon, steelhead and other species that ply the fragile Delta. The vote will eventually take water from Valley farmers, who have blasted the plan as a “water grab,” as well as cities such as Modesto and San Francisco.

The vote probably won’t be the last word on river flows, however. Earlier in the day, Brown’s administration offered a broad, $1.7 billion compromise agreement under which many cities and farms across the Central Valley would surrender water to the fish and would kick in cash to help the ailing species survive. The money would be spent on building spawning grounds and making other habitat improvements.

The compromise represents “collaboration over conflict,” said Chuck Bonham, director of Brown’s Department of Fish and Wildlife. Karla Nemeth, director of the Department of Water Resources, said some of the habitat restoration projects could begin as early as next year.

Water board members — all of whom are Brown appointees — said they weren’t dismissing the governor’s compromise outright. But by sticking to their original plan to reallocate water, they said they hoped to put pressure on a group of holdout water agencies that hadn’t agreed to a deal yet with Brown. Those agencies draw water from two of the most important rivers in the San Joaquin Valley — the Merced and Stanislaus.

A tentative deal has been made for the third main tributary of the San Joaquin, the Tuolumne River, which serves Valley farms as well as San Francisco and Modesto.

The settlement deals were pulled together in a month-long sprint and unveiled for the first time Wednesday morning. The board members said they need more time to study the agreements.

The agreements are “potentially quite good,” said state water board Chairwoman Felicia Marcus. “But … the devil’s in the details.”

Another big sticking point with the governor’s settlement: Environmentalists by and large don’t like it, saying the agreements don’t go nearly far enough to prop up sagging fish populations, and urging the water board to pursue its original plan.

Trout Unlimited — an organization where Bonham worked for a decade — rejected the early settlement plan, saying it “falls short of meeting the needs of fishing families and salmon and steelhead in too many California rivers and the Delta estuary.” Regina Chichizola of Save California Salmon urged the board to vote right away: “The salmon are at the point where they can’t wait any longer.”

Yet others warned the water board that the vote could lead to years of litigation — and could undermine the fragile agreements that were unveiled Wednesday.

And many of the participating water agencies insisted that the habitat restoration projects, including new spawning grounds, they’re agreeing to finance will lead to substantial improvements for the fish — at least as important as merely delivering more water. “We’ve known for a long time that water by itself isn’t enough,” Tom Birmingham of Westlands Water District, which serves farmers on the west side of the San Joaquin Valley, said in an interview.

The state water board has spent years studying water flows through the Sacramento and San Joaquin watersheds into the Delta. Earlier this year its staff rolled out a final plan for leaving 40 percent of the San Joaquin’s flow in the river and its tributaries. A similar plan for the Sacramento River watershed was set for a vote next year.

State water board officials described the situation as dire. In the San Joaquin rivershed, currently, as little as 20 percent of the water stays in the rivers. Marcus, chairwoman of the board, has said the status quo has put endangered fish species “on the verge of collapse,” even as she has acknowledged the hardships that farms and cities would face because of the board’s proposal.

The board was scheduled to vote on its plan in November but relented after Brown and Gov.-elect Gavin Newsom asked for additional time to broker a compromise.

The settlements unveiled by Nemeth and Bonham are unprecedented in many respects. Farms and cities throughout the Central Valley would surrender up to 700,000 acre-feet of water to the fish populations — enough water to fill three-quarters of Folsom Lake. Thousands of acres of farmland would be fallowed. Most water agencies would contribute millions to a “water acquisition fund,” to help pay for habitat restoration projects and to compensate some of the other agencies for the water they’re losing.

All told, the local water districts would kick in a total of $800 million and the state is planning to contribute $900 million, using water-bond proceeds and other sources, Nemeth said.

Wednesday’s development capped weeks of negotiation among water agencies, the Brown administration and President Donald Trump’s administration.

Trump’s administration, which has vowed to deliver more water to Valley farmers, sent a representative to the board meeting to repeat its vow to sue the state to block the water board’s original plan. In recent weeks, it stepped up pressure on state officials to find solutions to a series of problems facing the Delta, the hub of California’s water network. The Delta is jointly governed by the state and the federal government.

Brown’s administration, which has feuded with Trump on a host of environmental issues, signaled a thaw in relations last week by endorsing a plan in Congress to extend the Water Infrastructure Improvement for the Nation Act, a 2016 law that allows for greater water deliveries through the Delta to the south state. Earlier Wednesday, both sides announced they’d reached agreement on a broad set of issues concerning the Delta. Details weren’t revealed.

More in California News

CityView Plaza, a huge office, restaurant and retail complex in downtown San Jose, was bought in July for nearly $284 million -- in cash -- by an affiliate of developer Jay Paul, which in December landed $157 million in financing for the site.

The California Highway Patrol has released a video of one of its helicopter crews performing a dramatic rescue of two British men who were stranded on the edge of a massive granite cliff overlooking Yosemite Valley as a major snow storm was nearing.

A researcher at a university in the U.K. who came up with a mathematical equation declaring the third Monday in January as "the most depressing day of the year." A mental health advocate has debunked that theory.