Tropical Storm Javier pushed closer to the resort city of Cabo San Lucas on the tip of Mexico's Baja California Peninsula Monday, while the death toll from former Hurricane Earl rose to 40 in the country's eastern mountains.

Communities in two states were digging out from weekend mudslides during heavy rains brought by remnants of Earl, which slammed into Mexico's Gulf coast.

Javier was expected to brush Cabo San Lucas late Monday and continue raking the Pacific coast of the Baja peninsula.

Javier was located about 75 miles southeast of Cabo San Lucas Monday morning, with winds of 50 mph, according to the U.S. National Hurricane Center.

The center said "heavy rains (are) beginning to spread over southern Baja California" from the storm.

Javier was moving northwest, on a path that could take it inland further up the peninsula on Wednesday.

A hurricane warning was in effect for the southern tip of Baja California. A hurricane watch and tropical storm warning was in effect for parts of the peninsula farther north.

Among the casualties of Earl, at least 29 people died in multiple mudslides in the mountainous north of Puebla state, said state Interior Secretary Diodoro Carrasco. He said that an amount of rainfall equivalent to entire month of normal precipitation fell in one night in some areas.

Of the victims, 25 were killed in different parts of the township of Huauchinango and three died in the hamlet of Tlaola.

"It is a tragedy what has happened to our people in Huauchinango," said Gabriel Alvarado, the township's mayor.

In neighboring Veracruz state, 11 people lost their lives when mudslides hit the towns of Coscomatepec, Tequila and Huayacocotla, Gov. Javier Duarte said.