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.

The U.S. National Hurricane Center said the storm's sustained winds had declined to about 60 mph (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 50 miles (80 kilometers) northwest of Coatzacoalcos, and it could dump as much as 10 inches (25 centimeters) of rain, creating the threat of torrential flooding.

Much of the storm was already over land Thursday morning and it was centered about 5 miles (10 kilometers) east of Coatzacoalcos, moving to the west at 10 mph (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.

Ernesto has been the strongest storm to form in the Atlantic Ocean since the hurricane season began June 1, though stronger hurricanes hit Pacific coastal communities in May and June, causing at least three deaths, said David Zelinsky, a meteorologist at the U.S. hurricane center in Miami.

"Up to this point, most of the systems have been relatively weak," he said.

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 730 miles (1,175 kilometers) southwest of the southern tip of Mexico's Baja California Peninsula, with maximum sustained winds near 80 mph (130 kph).

___

Associated Press writer Mark Stevenson in Mexico City contributed to this report.