NEW ORLEANS -- Heavy rains and gusty winds knocked out power on the Gulf Coast on Saturday as a strengthening Tropical Storm Barry churned a path to shore, threatening millions and testing flood-prevention efforts implemented after Hurricane Katrina devastated New Orleans 14 years ago.

Officials predicted Barry would make landfall as this year's first hurricane in the morning near Morgan City, west of New Orleans. The long day started after an overnight curfew with on and off rain and power outages. People used cellphones to see in the dark, and opened doors and windows to let the warm, sticky tropical air circulate.

More than 45,000 people in southern Louisiana had lost power, and some roads were underwater as the edges of the storm lashed Louisiana and coastal Mississippi and Alabama with rain.

Though expected to be a weak hurricane -- just barely over the 74 mph (119 kph) wind speed threshold -- it threatened disastrous flooding across a swath of the Gulf Coast. The storm was expected to inflict the most damage on Louisiana and parts of Mississippi, with wind and rain affecting more than 3 million people.

Late Friday night, residents received good news from forecasters: The Mississippi River is expected to crest in New Orleans at about 17.1 feet (5.2 metres) on Monday, not 19 feet (5.8 metres) as had been earlier predicted. The levees protecting the city range from about 20 to 25 feet (6 to 7.5 metres) in height.

On-again, off again rain hit New Orleans overnight. As day broke, the streets in the normally raucous French Quarter tourist district were largely empty and barely damp. Dog walkers and a street sweeper rambled by. It was breezy, but flags on balconies overhanging the empty streets still occasionally fell limp. A few cars were out on roads. Some nearby homes had piled sandbags outside their doors.

"So far it's been really nice. It's been cool. It's been a little breezy," said Wayne Wilkinson, out with his dog in the French Quarter. He welcomed the pre-storm respite from July's normally sweltering heat, but said he was mindful that things could change: "I know we have to be on the alert."

Baton Rouge , which was devastated by floods in 2016 , was similarly quiet Saturday, with puddles left from overnight rains, wind shaking the trees and only a few cars and trucks on thoroughfare Interstate 10. In Alabama, rain pounded the eastern shore of Mobile Bay overnight, with scattered power outages in communities including Daphne, along Interstate 10.

Forecasters warned that most of the storm's rain remained over the Gulf of Mexico and would likely move into Louisiana and Mississippi later Saturday. There were predictions of 10 to 20 inches (25 to 50 centimetres) of rain through Sunday across a swath of Louisiana that includes New Orleans and Baton Rouge with some parts of the state possible getting 25 inches (63 centimetres).

"It's powerful. It's strengthening. And water is going to be a big issue," National Hurricane Center Director Ken Graham warned.

Governors declared emergencies in Louisiana and Mississippi, and authorities took unprecedented precautions in closing floodgates and raising the barriers around New Orleans.

Gov. John Bel Edwards said it was the first time all floodgates were sealed in the New Orleans-area Hurricane Risk Reduction System since Katrina. Still, he said he didn't expect the Mississippi River to spill over the levees despite water levels already running high from spring rains and melting snow upstream.

"My concerns are just hoping it's not going to be another Katrina," said Donald Wells, a restaurant cook in New Orleans.

Authorities told at least 10,000 people in exposed, low-lying areas along the Gulf Coast to leave, but no evacuations were ordered in New Orleans , where officials urged residents to "shelter in place."

Before they did, people packed stores to stock up on bottled water, food and other essentials.

Lifelong New Orleans resident Terrence Watkins grabbed supplies at a Costco, saying he has a few simple rules for big storms.

"Stock up on water. Stock up food. Get ready for the storm -- ride it out," he said.

Workers shored up and raised the levee system in places with beams, sheet metal and other barriers.

Rescue crews and about 3,000 National Guard troops were posted around Louisiana with boats, high-water vehicles and helicopters. President Donald Trump declared a federal emergency for Louisiana, authorizing federal agencies to co-ordinate relief efforts.

The impending storm also triggered a legal spat between neighbouring parishes. East Baton Rouge Parish won a temporary restraining order against the AquaDams that Iberville Parish planned to deploy along Bayou Manchac. A federal judge ruled Friday night that the water-filled flood control barriers could cause substantial property damage and loss of life in East Baton Rouge.

Scientists say global warming is responsible for more intense and more frequent storms and flooding, but without extensive study, they cannot directly link a single weather event to the changing climate.

Tracking forecasts showed the storm moving toward Chicago, swelling the Mississippi River basin with water that must eventually flow south again.

Before the worst of the storm, Kaci Douglas and her 15-year-old son, Juan Causey, were among dozens filling sandbags at a fire station in Baton Rouge. She planned to use them to shore up the door of her townhouse.

"I told my son, it's better to be safe than sorry," she said.

People in Baton Rouge also got a friendly warning to "stay inside and enjoy your extra hurricane snacks" from the twitter feed of Louisiana State University's current live tiger mascot, MikeVII.

In New Orleans, a group of neighbours cleaned out the storm drains on their street. Working together to lift off the heavy metal covers, they discovered that most of the drains were full of dirt, leaves and garbage.

All over town, people parked their cars on the city's medians -- referred to by locals as "neutral grounds" -- in hopes their vehicles would be safe on the slightly elevated strips.

After Katrina was blamed for more than 1,800 deaths, by some estimates, the Army Corps of Engineers began a multibillion-dollar hurricane-protection system that isn't complete. The work included repairs and improvements to some 350 miles (560 kilometres) of levees and more than 70 pumping stations.

------

An earlier version of this story had an incorrect last name for one New Orleans resident. He is Terrence Watkins, not Terrence Williams.

------

Associated Press reporters Rebecca Santana in New Orleans and Sarah Blake Morgan in New Orleans, Jay Reeves in Baton Rouge, and Rogelio Solis in Morgan City contributed to this report.