Hardest-hit was the central state of Puebla, where 29 people died, including at least 15 minors, as landslides buried several homes in the state’s northern mountains, the local government said.
Another 11 died in similar circumstances in the eastern state of Veracruz, its governor said.
Earl swept in from the Caribbean at hurricane strength Wednesday, striking just south of Belize’s capital. It hit Mexico as a storm on Thursday and eventually weakened to a tropical depression.
Even in its weakened state Earl carried a deadly punch over the weekend.
In the town of Huauchinango, the amount of rain that normally falls in a month came pouring down in just 24 hours, the Puebla government said Sunday.
A rain-soaked hill crumbled and came sweeping down on an adjacent village, killing 11 people including eight minors, it said.
Several highways in Puebla were ripped up, two bridges collapsed and power was knocked out in several towns.
Governor Rafael Moreno Valle pledged to rebuild damaged structures and posted on Twitter photos of himself walking in mud and residents helping in clean-up efforts.
By late Sunday Moreno Valle warned that the death toll could rise.
“We’re still in a search mode and we already have canine teams… searching for missing people,” he said.
Puebla officials did not say how many people were missing, but they did say that the landslides and flooding left some 200 people homeless.
In the state of Veracruz, 11 people were killed due to landslides and flooding, Governor Javier Duarte wrote on Twitter.
The dead included an elderly man who was swept away in his home by a rain-swollen river, officials said.
Some 1,200 people were moved to shelters across Veracruz due to effects of the storm, officials said.
Javier on its way
By Monday, however, it was approaching Tropical Storm Javier that was sparking new warnings.
Javier, which could strengthen to hurricane status by Monday afternoon, was expected to bring heavy rains and high winds to south-western Mexico in the coming days, US weather forecasters said.
The Miami-based National Hurricane Centre said Javier was about 250 miles (405 km) southwest of Cabo San Lucas, Mexico.
“On the forecast track, the centre of the tropical cyclone should pass near or over the southwest coast of Mexico later today, and approach the southern portion of the Baja California peninsula on Monday,” the centre said.
The storm was packing maximum sustained winds of 50 miles per hour (85 km/h) with higher gusts and was expected to dump four to six inches (10 to 15 cm) of rain in western Mexico, it said.
Mexican forecasters warned of swollen rivers, heavy rain, choppy waves and flooding due to Javier.
Another tropical storm, Ivette, also was swirling in the eastern Pacific, but it was far from land and expected to weaken later in the day, according to the NHC.