A hurricane warning was in effect Friday morning as Tropical Storm Barry, threatening as much as 20 inches of rain and dangerous storm surges, headed for a likely collision with the Louisiana coast.

President Donald Trump declared a federal emergency for Louisiana late Thursday, ordering U.S. government assistance to state and local response efforts.

The National Hurricane Center said Barry was creeping along at 3 mph on a track that would take it over the central or southeastern coast of Louisiana late Friday or early Saturday, then move it into the lower Mississippi Valley on Sunday.

The hurricane warning didn't cover rain-swamped New Orleans, which was — for now — under a tropical storm warning.

Forecasters said the storm's slow movement would mean rain would remain over the coast for an unusually long time, resulting in a threat of severe flooding along the entire central coast of the Gulf of Mexico and well inland into early next week.

WATCH: Meteorologist @BillKarins explains why the storm bearing down on the New Orleans region this weekend presents a potentially historic threat, despite only being classified as a tropical storm. https://t.co/EV22rk7NSq pic.twitter.com/zHzoVmJ9bA — NBC News (@NBCNews) July 12, 2019

The hurricane center said flooding from Barry carried the potential for "devastating impacts across southeast Louisiana and southern Mississippi," and storm surge watches and warnings were in effect for much of the Gulf Coast from Alabama to the western Louisiana coast. Storm surges are life-threatening inundations of rising water moving inland.

"It's the water that's the most deadly part of these tropical systems — 90 percent of the fatalities in these tropical systems is the water," National Hurricane Center Director Ken Graham told NBC affiliate WDSU of New Orleans.

Louisiana Gov. John Bel Edwards said he was confident that the Mississippi River wouldn't overflow levees. Still, he urged residents to take maximum precautions.

"This is going to be a major rain event across a huge portion of Louisiana," Edwards, who authorized the activation of up to 3,000 National Guard personnel, told reporters. "Look, there are three ways Louisiana floods — storm surge, high rivers and rain. We're going to have all three."

The town of Grand Isle, Louisiana, south of New Orleans, ordered a mandatory evacuation of residents at noon Thursday.

Tropical Storm Barry pic.twitter.com/GNh8qUhQdN — Christina H Koch (@Astro_Christina) July 11, 2019

Plaquemines Parish, southwest of New Orleans, had already started evacuating residents Wednesday afternoon.

"We're erring on the side of caution," Parish President Kirk Lepine said. "We want to make sure every resident is prepared and they're to understand that this government will take care of everybody in his parish."

Multiple airlines, including United, Jet Blue, Delta, American, Southwest, Spirit and Frontier, told passengers they could rebook flights to and from Gulf Coast airports at no additional charge.

In the southwestern Louisiana city of Lake Charles, residents lined up at five stations to gather sandbags and other supplies.

"I should have before, and I didn't," Vanessa Rigmaiden told NBC affiliate KPLC as she filled sandbags to protect her home, her business and her daughter's home. "So this time, I'm going to be smart."

Davin Stevens, 12, spent the day filling sandbags for other residents.

"I like doing the work, and I like helping people," Davin told KPLC.

Meanwhile, the Department of Homeland Security said it wouldn't conduct enforcement activities at shelters and other evacuation sites in affected areas of Louisiana and Texas.

New Orleans and Houston were among 10 cities reported to have been targeted for mass raids by Immigration and Customs Enforcement, which two senior Homeland Security officials told NBC News were scheduled for Sunday.

Plans for the raids alarmed immigration advocates and lawyers, who sought an `injunction to stop the raids in U.S. District Court on Thursday.

Without confirming reports of the planned raids, Homeland Security said in a statement Thursday night that "there will be no immigration enforcement initiatives associated with evacuations or sheltering related to the storm, except in the event of a serious public safety threat."

"Our highest priority remains the preservation of life and safety," the agency said.