TAMPICO, Mexico — Tropical Storm Alberto, the season’s first named storm, weakened Thursday as it moved inland over northeast Mexico after bringing heavy rains to parts of the parched region and leaving at least four dead.

The storm was weakening rapidly over land and was downgraded to a tropical depression by the U.S. National Hurricane Center.

But forecasters said heavy rain amounting to several inches was still expected inland in Mexico’s Tamaulipas, Nuevo Leon and Coahuila states. South Texas was forecast to see diminishing rain Thursday.

Immediately after it moved ashore in Tampico, there was initial disappointment at the meager amount of rain that fell. Showers had been sporadic through the early morning, with the sun even breaking through at times.

But inland, heavy rain was causing damage in the neighboring states of Nuevo Leon and Veracruz.

There, civil protection authorities reported four deaths linked to Alberto’s rains. They said one man died in the La Silla river in the city of Monterrey, the state capital, and that two minors died from electric shocks in the municipality of Allende. A man in El Carmen, Nuevo Leon, was electrocuted when he tried to repair wires in the rain, civil protection said.

Water also washed out a segment of a major highway connecting Monterrey and Saltillo.

Alberto had spurred tropical storm warnings covering most of the western Gulf of Mexico’s coastline from Texas to Veracruz. The storm made landfall with maximum sustained winds of 45 mph.

As much as 5 to 10 inches of rain was expected in some parts of northeast Mexico and southern Texas, with even higher isolated totals possible, according to the hurricane center. Some higher locations in Mexico could see as much as 20 inches of rain, which could result in mudslides and flash flooding, especially in the states of Tamaulipas, Coahuila and Nuevo Leon.

Alberto was bringing rains and flooding to the coast of Texas as well.

The U.S. National Weather Service said the main hazard for southern coastal Texas is flooding from excess rain. Areas along the Texas coast saw some road flooding and dangerous rip currents Wednesday, and waterspouts were spotted offshore.

The mayor of Corpus Christi planned to request a disaster declaration after parts of the city were drenched with up to 6 inches of rain Wednesday, a spokeswoman said. Residents reported water and wind damage, and canals were damaged on the north end of Padre Island, Brianna Sandoval said Thursday.

Two people were rescued from vehicles that stalled over flooded roads, and a downed power line rerouted highway traffic for part of the morning. The city remained under a flood warning.

In Surfside Beach, a Texas city on a barrier island, storm surge early Thursday left some damaged roads and lots of debris but “very little damage” to the mostly elevated structures, Mayor Gregg Bisso said.