Ongoing rainfall overwhelms the city's drainage system, causing flooding of homes, restaurants and the local freeway. And the community's flat, near-sea-level terrain makes it difficult to drain.

Start with a flat, low-lying beach city paved with concrete and asphalt. Add more than 5 inches of rainfall in three days, which gave Long Beach one of the highest totals in Southern California. Throw in some clogged storm drains and you've got a recipe for a city under water.

While forecasters warned residents of Los Angeles County foothills to be prepared for possible mudslides this week, it was Long Beach that seemed to suffer the brunt of storm-related flooding.

Palm fronds, tree branches, trash and, in one case, an old mattress choked Long Beach storm drains and catch basins, causing water to rise chest-high in residential neighborhoods and stream across restaurant floors.

The 710 Freeway has flooded twice, and the city shut down several tunnels and roads around the Long Beach Airport. Public works crews have responded to 511 flooded locations since Tuesday, and the Fire Department has responded to 236 water-related calls for service.

Classes were canceled for two days at Cal State Long Beach after three floors of the Student Union building flooded. And the city's public library, known for its leaky roof, was also closed.

So why has Long Beach been hit so hard? City officials say the drainage system has simply been overwhelmed, with the sewer system so full it caused manhole covers to come loose.

"When the storm cell approaches and the heaviest rain starts to fall, we do have some localized flooding in various locations," said Long Beach Fire Capt. Jackawa Jackson. "It really doesn't matter how big your storm drain is, when it dumps a lot of water, it's going to flood."

Mike Conway, director of the city's Public Works Department, said the city's storm drain system is designed to handle up to an inch of rain an hour; on Tuesday, the rate was double that.

As rain came yet again on Thursday, city workers cleaned out catch basins and shut down half a dozen intersections prone to flooding. One crew was dedicated to picking up palm fronds.

"This is the first time in all my 70 years that I've seen this much water," said America Gomez, a baby-sitter in a ground-floor apartment on Ximeno Avenue near Wilson High School who had piled three rows of sandbags in front of the door after flooding this week.

"We're praying to God that no more rain falls," she said. "We're afraid we're going to lose everything we have."

"That carpet shop next door, it's a swimming pool," said Henry Ocampo, manager of a window tinting shop that was 6 inches deep in water.

Ocampo offered an explanation for the city's drenching: "We're at the bottom of everything. We'll swim if we have to, though."

Academics say so much rainfall in such a short time period would overwhelm most cities' sewer systems. But another reason is topography: Long Beach's flat, close-to-sea-level terrain makes it difficult to drain.

It is also sandwiched between the San Gabriel and Los Angeles rivers, and when those outlets fill up, "the water has nowhere to go," said Brett Sanders, a professor of civil and environmental engineering at UC Irvine.

"The flood control infrastructure is vulnerable" during an intense storm, Sanders said. "Once drains clog up, you can see flooding happen pretty soon after that."

Local fire stations have doled out about 80,000 sandbags in three days, and scofflaws resorted to bagging sand from the beach.

The city suspended trash pickup, hoping residents wouldn't put out their bins, some of which had tipped over, blocking drains and sending trash into gutters.

"It was so fast; the water just came down like a bucket," said Cindy Stromlund, vice president of the branch. "Long Beach isn't totally flat, but unfortunately, the low-lying areas aren't that noticeable until the water starts collecting."