SACRAMENTO, Calif. — After massive downpours flooded California's rivers and packed mountains with snow, the state reported Monday the first increase in groundwater supplies in four years.

The state saw 4.1 million acre-feet of managed groundwater recharge in the water year ending in September, and an 8.7 million acre-feet increase in groundwater storage, California's Department of Water Resources said. Groundwater supplies are critical to growing much of the country's fresh produce.

The semiannual report came after water officials stepped up efforts during last year's rains to capture water flows from melting snowpack in the mountains and encouraged farmers to flood fields to replenish groundwater basins.

''The impressive recharge numbers in 2023 are the result of hard work by the local agencies combined with dedicated efforts from the state, but we must do more to be prepared to capture and store water when the wet years come,'' Paul Gosselin, deputy director of sustainable water management for the agency, said in a statement.

California has been seeking to step up groundwater recharge with ever-drier years expected from climate change. Much of the state's population counts on groundwater for drinking water in their homes, and farmers that grow much of the country's food rely on the precious resource for crops ranging from carrots and almonds to berries and leafy greens.

For many years, Californians pumped groundwater from wells without measuring how much they were taking. But as some wells ran dry and land began sinking, the state enacted a law requiring local communities to start measuring and regulating groundwater pumping to ensure the basins would be sustainable for years to come.

In Monday's report, California water officials noted that some areas where land had been sinking saw a rebound as users pumped less groundwater since more surface water was available following the rains. Overall, the state extracted 9.5 million acre-feet of groundwater during the last water year, down from 17 million a year before, the report said.

Some farmers in California have reported seeing a recovery in their wells this year, prompting them to question how much the state needs to cut groundwater pumping. Joaquin Contente, a dairy farmer in the crop-rich San Joaquin Valley, said he has seen recovery in his wells, with one returning to 19 feet (5.8 meters) deep from more than 30 feet (9.1 meters) deep two years ago.

''They've already come back to almost a normal level,'' he said.

California water officials welcomed the recharge but said it would take five rainy years like last year to boost groundwater storage to levels needed after so many years of overpumping.