A resident inspects damage to his house affected by a mudslide in Xaltepec, Mexico, Monday, Aug. 8, 2016. Mountain communities in two Mexican states are recovering from weekend mudslides that killed dozens during heavy rains brought by remnants of Hurricane Earl. (AP Photo/Pablo Spencer)

A resident inspects damage to his house affected by a mudslide in Xaltepec, Mexico, Monday, Aug. 8, 2016. Mountain communities in two Mexican states are recovering from weekend mudslides that killed dozens during heavy rains brought by remnants of Hurricane Earl. (AP Photo/Pablo Spencer)

CABO SAN LUCAS, Mexico (AP) — Tropical Storm Javier weakened a bit as it bore down on the resort city of Cabo San Lucas at the tip of the Baja California Peninsula late Monday, while the death toll from former Hurricane Earl rose to 45 in Mexico’s eastern mountains.

Communities in two states were digging out from weekend mudslides during heavy rains brought by remnants of Earl, which hit Mexico’s Gulf coast as a tropical storm. Three more bodies were found amid the mud and floodwaters in central Puebla state, bringing the death toll there to 32. Two more dead were found in neighboring Veracruz, raising the toll in that state to 13.

Javier was forecast to scrape along the shore as it passed by Cabo San Lucas during the night and continue on a northerly track, raking the Pacific coast of the Baja peninsula.

The storm was centered about 30 miles (50 kilometers) south-southeast of Cabo San Lucas late Monday, with maximum sustained winds of 60 mph (95 kph), the U.S. National Hurricane Center said. It said two to four inches of rain could fall on the peninsula’s southern portion, with possible maximum amounts up to eight inches in isolated spots.

Javier slowed its forward movement considerably and was moving northwest at about 5 mph (7 kph) on a path that could brush land around Puerto San Carlos, farther up the peninsula, on Wednesday and again around Laguna San Ignacio later in the week. Javier was expected to begin a weakening trend Tuesday afternoon.

Authorities in Cabo San Lucas set up 10 storm shelters, mostly at local schools, and evacuated families who live in low-lying areas near streams. The resort was closed to navigation, and some owners of smaller fishing boats were seen pulling them onto shore and hauling them away on trailers.

Among the casualties of Earl were at least 32 people killed in multiple mudslides in the mountainous north of Puebla state, state Interior Secretary Diodoro Carrasco said. He said rain amounts equivalent to an 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 Huauchinango mayor.

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