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.