SACRAMENTO — For Robert Friend, home was a tent pitched down by the American River off 12th Street. It was quiet, secluded in the bushes, a respite from life on the pavement downtown.

Or at least it was until the storms came.

“I got flooded out,” said Mr. Friend, 48, looking weary on a recent afternoon as he stood on the sidewalk he had escaped to a few blocks from the river. “This is the worst winter I’ve known in the 10 years I’ve been here. Last night and the night before I was just under a tarp, waiting it out. It was freezing-raining all night long.”

The rains that lashed California this year, continuing with yet another wave of downpours through last weekend, have pulled this state out of a historic drought. But they also exposed the extent and agony of homeless women and men who have long made homes along the banks of the now-swollen rivers across California, and particularly in Sacramento, a city of 480,000 where a largely hidden community has lived on the outskirts since the Great Depression. According to city and state officials, about 2,700 of the 118,000 homeless people in California live here.

The rains — the most during California’s rainy season since the state started keeping precipitation records nearly a century ago — overwhelmed the two rivers that converge on the northwest side of the city, the Sacramento and the American. They ripped away the cloak of shrubbery along the rivers’ banks, forcing people camped there to move to more exposed ground. Cold, soaked and stranded, they used makeshift rafts to float to safety, or waited for rescue by the Fire Department from their camps two miles from the State Capitol and within walking distance of the Governor’s Mansion.