NEW ORLEANS — With rain threatening, work crews scrambled on Friday to repair New Orleans’s pumping and drainage network in the hopes of preventing a repeat of last weekend, when flooding inundated many neighborhoods and forced city officials to admit that vital pieces of the system were inoperable.

Gov. John Bel Edwards of Louisiana declared a state of emergency on Thursday, and Mayor Mitch Landrieu urged residents to be ready to move cars to higher ground and to stay off the streets during rainstorms. Local schools closed on Thursday and Friday in case students were unable to get home through flooded streets.

The city’s problems began last Saturday when the drainage system failed to keep up with a severe thunderstorm that brought nearly 10 inches of rain. As waters rose, much of the city became impassable. Hundreds of cars and more than 200 properties were flooded.

At first, the officials who oversaw the drainage pumps insisted the system was working properly, but by midweek they were forced to backtrack. Then an electrical fire on Wednesday night knocked out the last turbine capable of powering all of the drainage pumps in the heart of the city. Three other turbines are also down.

By Friday, the damaged turbine had been repaired, and city officials said it would be brought back online gradually. If the repairs fail, the drainage system will again rely on its remaining backup turbine, which can power only 38 of the 58 pumps on the French Quarter side of the Mississippi River.

With pump capacity essentially cut in half, the possibility of street flooding with the next rainstorm has put city residents on edge.

Work crews labored on Friday to install a raft of emergency generators, and the city began to hand out 40-pound sandbags. Families flocked to grocery stores for supplies.

Derrick Freeman, 43, a drummer, had already missed a gig on Saturday night because he was stuck in his home in the Mid-City neighborhood, surrounded by waist-deep water that flooded his car. His home escaped water only because it is raised up on concrete piers, like many older homes in the city.

Then, on Thursday, he was startled awake at 3 a.m. by an emergency message telling residents that the city had lost power to critical pumps. He drove uptown for a meeting later that morning in a borrowed car and said he felt rattled when rain hit the windshield. “I thought: ‘This is ridiculous. It’s August in New Orleans. It’s going to rain every day.’ But I’m freaking out at a sprinkle of rain, thinking it’s going to flood.”

The statements by city officials only compounded the anxiety.

Longtime New Orleans residents were astonished that this famously wet city could be so paralyzed by a rainstorm. After all, it is the middle of hurricane season, when storms are known to approach from the Gulf of Mexico. Federal hurricane-protection levees remain intact.

A photographer, Cheryl Gerber, posted pictures of clogged storm drains around her home next to the French Quarter, despite a $3 million plan by the city to clean them. Ticket holders slogging out of the low-lying Broad Theater in knee-deep water on Saturday evening reported looking across Broad Street at a largely silent pumping station.

During a City Council hearing on Tuesday, officials admitted that drainage systems in the hardest-hit neighborhoods had been limping along at half strength. And, as it turned out, the plan to clear the storm drains had been stuck in planning stages for months.

Shortly afterward, Mr. Landrieu, who is usually cautious about publicly criticizing his staff, let loose. “The obfuscation we saw today, it’s insulting to the public,” he said as he accepted the resignation of the director of public works and, as president of the Sewerage and Water Board, called for other high-ranking officials to step down.

Cedric Grant, executive director of the Sewerage and Water Board, announced that he would resign this fall.

“Obviously there’s a weak link in this protection chain, because of the Sewerage and Water Board’s inability to do something as basic as drainage,” said State Senator J. P. Morrell of New Orleans.

The crisis involves the city’s interior drainage system, a vast 200-mile chain of canals and pipes. Many of the pumps are “screw pumps,” first installed about 100 years ago, that use jumbo corkscrews to create siphons, the way sucking on a drinking straw can lift water out of a glass. The water then flows into a different set of pipes that empty into Lake Pontchartrain and other nearby bodies of water.

The turbines, too, are antiquated. In recent debates about the need for more investment and upgrades, local officials compared the turbines to 1967 Chevys. “It is an antiquated system,” said Tyronne Walker, a spokesman for the mayor. “It’s a complex system. It can run well. But not when multiple pieces aren’t operating during a critical moment.”

Mr. Morrell, like the mayor, was particularly critical of officials of the Sewerage and Water Board, who failed to notify the mayor, the City Council and the State Legislature that three of its five turbines were offline, one since 2012 and two more after a severe rainstorm in July.

Mr. Morrell noted that, had the Legislature known, it could have extended emergency assistance to get the repairs completed. “The moment they had less than half of their turbine capacity left during hurricane season, they should have broken the glass, pressed the button, done everything they could to get that fixed,” he said.