CEDAR RAPIDS, Iowa — An elaborate system of temporary floodwalls largely protected Cedar Rapids homes and businesses Tuesday as the river that runs through the city reached its second-highest peak ever.

City officials said the 9.8-mile system of Hesco barriers and earthen berms that contractors erected over the weekend was successfully holding back the rain-swollen Cedar River.

The city, Iowa’s second largest, received good news as the river crested Tuesday morning at 22.1 feet — a foot lower than predicted Monday and three feet lower than forecast over the weekend. That was 9 feet below the 2008 flood that destroyed thousands of homes and businesses in the worst natural disaster in Iowa history.

The Hesco barriers used to hold back the floodwaters are comprised of steel mesh panels, lined with a thick polypropylene material that can be quickly filled with sand or dirt, usually using a front-loader. The barriers, which have been used extensively by the military in Iraq and Afghanistan, keep water from seeping through to the other side, but allow moisture to drain out the bottom.

City crews had worked through the night to patch any weaknesses in the protection system and pump out water that seeped through the barriers or came up through the saturated ground.

“City employees and contractors worked in really heroic ways to make sure the temporary system we put in place was fully functional,” said city manager Jeff Pomeranz.

Their work continued Tuesday as the city turned its focus underground to its pressure-packed sewer system, which officials worried could send water shooting onto streets in the coming hours and create dangerous conditions for any bystanders.

“The enemy now is what we don’t see,” Pomeranz said.

City crews pumped water back into the river Tuesday in downtown and surrounding neighborhoods, which were largely abandoned as residents heeded the city’s call to evacuate.

Nick Jelinek, 37, said the flood protection was working “great” as he pumped water out of the basement of a business building he owns in the usually bustling New Bo district. “This is as good as it could go,” he said.

Jelinek said another building he was renovating into a reception hall was on the “wrong side” of the barriers and had three feet of water inside — a setback he called modest. At least a handful of other buildings, including two bars, appeared to have major water damage.

While the protection system was largely working, city officials said that many homes and businesses near the river will likely have water in their basements. They warned about the prospect of residential sewer backups and structural damage.

With the river expected to remain far above flood stage, it will likely be a few more days before residents are allowed to return to their homes and businesses and key roads reopen. Classes at public schools remained cancelled Tuesday and Wednesday.

Firefighters and police officers rescued a woman Monday afternoon who had been swept away by the river north of the city’s downtown. She was able to cling to a tree until emergency responders reached her and got her to safety.

“Several officers and firefighters put their lives at risk and in great, great danger,” said Cedar Rapids fire chief Mark English, who urged residents to stay out of low-lying areas that had been evacuated.