Thousands of North Carolina residents were allowed to return home Wednesday after a landslide caused by heavy rains prompted mandatory evacuations near a dam, officials said.

Residents living below Lake Tahoma, in western North Carolina, were ordered to leave around 1 a.m. ET Wednesday after the Tahoma Dam was inspected by an engineer and officials determined that the landslide had compromised its integrity.

"Act now to preserve your life," urged a tweet from the National Weather Service office in Greenville-Spartanburg, South Carolina.

MCDOWELL COUNTY UPDATE: A landslide has comprised the integrity of Lake Tahoma Dam. MANDATORY EVACUATIONS underway from the Dam at Lake Shore Dr to Lake Tahoma Rd (NC 80) to the confluence of the Catawba River near Resistoflex Rd and Riverside Park. ACT NOW TO PRESERVE YOUR LIFE! — NWS GSP (@NWSGSP) May 30, 2018

In the early hours of Wednesday morning, officials in McDowell County reported widespread flooding after heavy rainfall of 4 to 6 inches over the past 24 hours, the National Weather Service said. "This is causing significant and life-threatening flooding countywide," it said.

The flooding was triggered by the soggy remnants of Alberto, the first named storm of the Atlantic hurricane season.

The flash flooding emergency expired at 10:30 a.m. Around the same time, officials lifted the mandatory evacuation order after deeming the dam safe.

Earlier, the National Weather Service said a flash flood emergency was in place for McDowell County, which includes the city of Marion, home to around 7,800 people, and Old Fort, population 900.

Residents living below Lake Tahoma in North Carolina were ordered to evacuate. Bing Maps

It added: "Floodwaters have reached levels not seen since the September 2004 floods associated with Hurricanes Frances and Ivan. Numerous evacuations of residences, businesses and campgrounds; road closures; water rescues; and landslides are ongoing."

William Kehler, McDowell County's emergency services director, told NBC News that several thousand people lived in the evacuation zone.

Lake Tahoma is about five miles northwest of Marion, which is about 36 miles east of Asheville.

There were no casualties reported from the floods. North Carolina Gov. Roy Cooper said in a statement that two state Department of Transportation workers were swept away by a mudslide in McDowell County as they worked to clear debris from a previous mudslide, but they managed to stand on a truck that had fallen into the Catawba River until they were rescued. Cooper declared a state of emergency for western North Carolina on Wednesday.

McDowell county emergency management reports water is spilling around the sides of Lake Tahoma dam. Evacuations ongoing south of the dam. THIS IS A LIFE-THREATENING SITUATION. HEED ALL EVACUATION ORDERS IMMEDIATELY! If you are not threatened by floodwaters, shelter in place. — NWS GSP (@NWSGSP) May 30, 2018

Alberto has hit multiple states. Flash flood watches were in effect early Wednesday for parts of several states from Alabama through Tennessee, Kentucky, Illinois, the Carolinas and Virginia and West Virginia.

A mudslide shut down three lanes of traffic on Interstate 40 in North Carolina overnight. WCNC

A television news anchor and a photojournalist covering the weather in North Carolina were killed Monday when an uprooted tree toppled onto their SUV in North Carolina.

NBC affiliate WYFF of Greenville said news anchor Mike McCormick and photojournalist Aaron Smeltzer were killed.