CEDAR RAPIDS, Iowa — Facing their second-largest flood in city history, Cedar Rapids leaders and residents pinned their hopes Monday on a 10-mile system of quickly erected flood barriers to protect government buildings, homes and businesses in Iowa’s second largest city.

Crews scrambled to build the floodwall over the weekend to block the rapidly rising Cedar River because, despite years of discussions, officials haven’t been able to secure funding for permanent flood barriers following a devastating flood in 2008.

“The city had eight years to do this but decided to throw up a temporary system in three days,” said Jim Soukup, 30, who sat on a pile of sandbags outside his parents’ home in the Czech Village neighborhood, which was largely empty after thousands of residents heeded a voluntary evacuation ahead of the river’s anticipated crest on Tuesday.

Soukup said he and his father would guard the home — which had several feet of flood water in 2008 — to avoid the prospect of looting.

The river is already in major flood stage, rising past 20 feet on Monday. It was expected to crest at 23 feet, which is eight feet below the 2008 flood that devastated wide swaths of the city of 130,000 people.

Mayor Ron Corbett said 9.8 miles of earthen berms and Hesco barriers, which are mesh-framed, collapsible boxes that can quickly be filled with sand or other material that weren’t available to the city in 2008, have been erected throughout the city. As a secondary line of defense, more than 250,000 sandbags had been piled up around property.

“If it works, we will save the city,” Corbett said.

City leaders plan to closely monitor the flood system, noting that any breaches could cause water to quickly gush into areas and cause problems for residents who don’t evacuate. Authorities said more than half of the 5,800 properties in the evacuation zone had been evacuated by Sunday, and the area had a ghost-town feel by Monday afternoon.

The city had time to prepare because forecasters have been warning of the floods since last week, following heavy rainfall to the north. City leaders said they believed the system would greatly minimize the damage.

But they’ve struggled to secure funding for a better flood protection system for low-lying areas. Residents voted down a sales tax increase that would have helped pay for it years ago.

Now the city is waiting on Congress to authorize and appropriate the federal share of a plan to build a permanent flood system along with investments from the state and the city. City Manager Jeff Pomeranz said lobbying for the federal money is a top priority and the project will be critical to the city’s future. Iowa’s members of Congress are expected to push for the financing in the coming days.

Still, retired plumber James Adair, 78, said he was frustrated the city had secured money to rebuild many parts of downtown but still lacked flood protection. He spent $65,000 rebuilding his flood-damaged home after the 2008 flood.

“If we get flooded again, I am leaving,” he said. “The city should have gotten the river under control by now.”

Steve Wilhelm, 64, spent years rebuilding his family home after its main floor was inundated with 4 feet of water in 2008. He said he spent about $160,000 rebuilding the 1890 home in the neighborhood he grew up in with the help of the original owner’s great grandson.

“This house became my dream,” Wilhelm said Monday, getting a tear in his eye. “Walking away would break my heart.”