NEW ORLEANS, LA (CNN) — Three years ago, a federal court found the U.S. Army Corps of Engineers responsible for the catastrophic flooding of New Orleans during Hurricane Katrina in 2005.
On Monday, an appeals court threw that decision out.
The new court decision, which potentially gets the government off the hook for tens of millions of dollars in damages, is based on a legal provision specifically designed to keep courts from second-guessing government decisions when the government is sued for its actions or inaction.
Residents of New Orleans, where more than 1,000 people were killed and many thousands made homeless in one of the worst disasters in American history, have been suing the corps, arguing that it failed to maintain a Mississippi river canal and didn't protect the city properly from the storm.
A federal judge issued a blistering decision against the corps in 2009, accusing it of negligence over a period of 40 years because of "insouciance, myopia and short-sightedness."
U.S. District Court Judge Stanwood Duval Jr. awarded hundreds of thousands of dollars in damages to each of five families that lived in the worst-hit sections of the city: the Lower 9th Ward and St. Bernard Parish.
The ruling opened the way for about 100,000 other homes and businesses in the affected area to claim compensation, theoretically making the government liable for tens of millions of dollars.
But a higher court reversed the decision Monday.
The appeals court found that the government could not be held responsible because of a provision known as the discretionary function exception, or DFE, which says the government can't be sued for actions that an agency or government employee makes, or fails to make, if the function is discretionary.
The DFE is intended to prevent courts from second-guessing government decisions "grounded in social, economic, and political policy" during the course of lawsuits, the appeals court said.
"Our application of the DFE ... completely insulates the government from liability," the three judges hearing the case wrote.
Monday's ruling is not final. Plaintiffs can ask the full 5th Circuit Court to rehear the case, or they can appeal to the U.S. Supreme Court.
Katrina made landfall on the morning of August 29, 2005, between Grand Isle, Louisiana, and the mouth of the Mississippi River. A few hours later, the storm again crossed over land on the other side of the river, its winds only slightly diminished.
Once a Category 5 storm, it had weakened to a Category 3 storm with 127 mph winds when it hit.
Katrina devastated New Orleans when the city's levee system failed and widespread flooding occurred. More than 1,800 people died in the storm, nearly 1,600 in Louisiana.
Overall, the storm damage covered more than 90,000 square miles and displaced nearly 300,000 people, causing more than $81 billion in damage. The Federal Emergency Management Agency called Katrina "the single most catastrophic natural disaster in U.S. history."
The plaintiffs who sued the government said the Army Corps of Engineers' failure to properly maintain the Mississippi River-Gulf Outlet canal made the flooding significantly worse than it would otherwise have been.
In the 2009 district court ruling, Duval wrote that because the corps failed to maintain the shipping channel, erosion widened it, and its banks -- which helped protect the levees -- deteriorated, leaving the levees unprotected, undermined and more vulnerable to waves coming off Lake Borgne.
The corps also failed to take other actions, such as armoring the banks with rocks, attorneys for the plaintiffs said.
-- CNN's Ashley Hayes and Dave Alsup contributed to this report.