Tropical Storm Ernesto headed into Mexico's southern Gulf coast Thursday as authorities in the flood-prone region prepared shelters, army troops and rescue personnel for drenching rains.

Ernesto spun through the southern Gulf of Mexico overnight, across waters dotted with oil rigs operated by the state oil company, after hurling rain across the Yucatan Peninsula but causing little major damage. The government closed its largest Gulf coast port, Veracruz and the smaller ports of Alvarado and Coatzacoalcos.

Coatzacoalcos, located near the storm's path southeast of Veracruz port, was already getting hit with bands of rain from Ernesto, said city civil defense chief  Juventino Martinez.

"It's raining intermittently, it rains, its stops, and then it rains again," Martinez said. "We have some flooding, some water building up" on streets in lower-lying sections of the city. He said 40 shelters were ready but hadn't been used yet. Municipal employee Brito Gomez reported water was waist-high in some neighborhoods.

About 2,000 army and navy personnel are on stand-by to head to the jungle-clad hillside inland to help in rescue work if needed, said Noemi Guzman, Veracruz state civil defense director.

Threat of torrential flooding

The U.S. National Hurricane Center said the storm's sustained winds had declined to about 95 kph as it interacted with land along the coast. It had grown into a hurricane shortly before landfall Tuesday night near the cruise ship port of Mahahual, but it weakened as it crossed the peninsula. Ernesto then steamed back out in the Gulf of Mexico.

Forecasters said Ernesto was expected to roar through Veracruz state's lush Los Tuxtlas region, roughly 80 kilometres northwest of Coatzacoalcos, and it could dump as much as 25 centimetres of rain, creating the threat of torrential flooding.

Much of the storm was already over land Thursday morning and it was centered about 10 kilometers east of Coatzacoalcos, moving to the west at 17 kph.

The port captain for Veracruz city, Enrique Casarrubias, said the port there was closed to smaller vessels. The Carnival Elation cruise ship canceled a Wednesday stop, he added.

Petroleos Mexicanos, the state oil monopoly, announced it had evacuated 61 workers from a drilling platform and had taken other safety precautions, but it said production had not been affected.

No reports of death, major damage

There were no reports of storm deaths or major damage, though Ernesto ripped down billboards, toppled trees and cut electricity as it hit land well south of the region's main resorts of Cancun and the Riviera Maya and then passed near the Mayan ruins of Calakmul.

In the Pacific, Hurricane Gilma gained some strength but was not seen as a threat to land. Early Thursday, it was about 1,175 kilometres southwest of the southern tip of Mexico's Baja California Peninsula, with maximum sustained winds near 130 kph.