* Ernesto weakens as its nears Mexican coast again
* Hurricane warnings called off
* Major oil-exporting ports remain closed (Updates position, death toll, adds tropical depression 7)
MEXICO CITY, Aug 9 Tropical Storm Ernesto crossed the coast of the Gulf of Mexico on Thursday, sending wind gusts and showers across the state of Veracruz, home to some of Mexico's busiest ports and oil installations.
The storm, with maximum sustained winds of 50 mph (85 kph), made landfall in the early afternoon close to the port city of Coatzacoalcos. Ernesto was heading west over southern Mexico at a speed of about 10 mph (17 kph), the U.S. National Hurricane Center in Miami said in its 5 p.m. EDT (2100 GMT) advisory.
Mexico's government downgraded a hurricane warning for the coast of Veracruz to a tropical storm warning. The hurricane center said it expects further weakening as Ernesto moves over mountainous terrain in the next day or two. However, torrential rain and flooding was expected in Veracruz and authorities reported three deaths.
Officials from state-run oil company Pemex said there were no reports of disruptions to facilities in the region, which include the Minatitlan refinery, producing 185,000 barrels of crude per day.
The eye of the storm passed the oilfields of Cantarell and Ku Maloob Zaap, which account for just over half of Mexico's oil production of about 2.5 million bpd.
Coatzacoalcos is home to one of Mexico's key oil exporting ports, which has been closed since Wednesday along with Cayo Arcas and Dos Bocas.
Almost all of Mexico's crude oil exports, which totaled 1.425 million bpd in June, are shipped to refineries on the Gulf Coast of the United States from the three ports.
Authorities in Veracruz said they were preparing emergency shelters, if needed, in the flood-prone and densely populated state. The small Mina-Coatza airport, between Minatitlan and Coatzacoalcos, was closed on Thursday and waves of 13-20 feet (4-6 meters) were reported along the coast.
Ernesto is forecast to plow through Veracruz state and into central Mexico on Friday as a tropical depression.
The storm previously made landfall on Mexico's Yucatan coast late on Tuesday as a Category 1 hurricane, the lowest on the five-step Saffir-Simpson scale, before being downgraded to a tropical storm on Wednesday.
Two people drowned and about 100 houses were damaged as the storm swept through the swampy state of Tabasco toward the Gulf of Mexico, according to local officials.
One person died in Coatzacoalcos after falling while working on home repairs, an official from the local Red Cross unit said.
The storm spared major tourist areas on the peninsula from a direct hit and landed in sparsely populated low-lying jungle, near the port town of Mahahual, 40 miles (64 km) north of Chetumal, the capital of Quintana Roo state.
Ernesto passed well south of the major tourist resort of Cancun, which saw only heavy rains.
About 2,500 people were evacuated from Chetumal up the coast to Tulum in an area known for its scuba diving and ecotourism attractions.
Rainfall of 3 to 6 inches (7 to 15 cm), and possibly 15 inches (39 cm) in some areas, was expected in the states of Tabasco, Veracruz, Puebla and northern Oaxaca through Friday, the center said.
August and September are usually the most active months of the Atlantic Caribbean hurricane season, which runs from June 1 to Nov. 30.
Tropical Depression Seven formed out in the Atlantic, but is heading west toward Central America. It is set to strengthen to a storm Friday and it could reach the Caribbean over the weekend, according to the Center's forecast. (Reporting by Ioan Grillo, Elinor Comlay, Krista Hughes and Lizbeth Diaz in Mexico and Luis Manuel Lopez in Tabasco; Editing by Todd Eastham and Stacey Joyce)