MEXICO CITY — Franklin strengthened into the first hurricane of the Atlantic season Wednesday as it neared Mexico’s central Gulf coast, heading for an overnight landfall that would be its second on Mexican territory in three days.

As a tropical storm, Franklin made a relatively mild run across the Yucatan Peninsula on Monday night and Tuesday, but on Wednesday its winds were gathering force as it prepared to pound a mountainous region prone to flash floods and mudslides with heavy rains.

Authorities in Veracruz state ordered Thursday’s classes cancelled at public schools as a precautionary measure. Schools are frequently used as storm shelters in Mexico.

The U.S. National Hurricane Center said Franklin had maximum sustained winds of 85 mph (140 kph) late Wednesday afternoon. The storm was expected to gain power as it moved across the southern Gulf of Mexico.

Franklin’s center was 90 miles (140 kilometers) northeast of the port of Veracruz and it was heading west at 12 mph (19 kph).

A hurricane warning was in effect for the coast from Veracruz city north to Cabo Rojo. A hurricane watch extended north from Cabo Rojo to Rio Panuco.

Mexico Civil Defense director Ricardo de la Cruz said Tuesday that the storm’s impact on Yucatan was not as bad as initially feared, with some trees down and power out in some areas.

But, he warned, “the second impact could even be stronger than the first.”

The area Franklin was expected to pass across north of Veracruz city early Thursday has been battered by deadly mudslides and flooding in the past.

Forecasters said Franklin could drop four to eight inches (10 to 20 centimeters) of rain, with localized amounts of up to 15 inches (38 centimeters).