Pablo Spencer, AP
Women prepare food for people who are in a temporary shelter in Papatlazolco, 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 — Tropical Storm Javier bore down on the resort city of Cabo San Lucas at the tip of Mexico's Baja California Peninsula on Monday night, while the death toll from former Hurricane Earl rose to 45 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 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 50 miles (80 kilometers) southeast of Cabo San Lucas on Monday night, with maximum sustained winds of 65 mph (100 kph), the U.S. National Hurricane Center said. It said hurricane conditions were possible for the southern part of the peninsula. The minimum sustained wind speed for a hurricane is 74 mph.

Javier was expected to begin weakening Tuesday afternoon. The hurricane center said heavy rains were pounding southern Baja California.

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.

Authorities in Cabo San Lucas prepared 10 storm shelters, mostly at local schools, and began evacuating families who live in low-lying areas near streams. The resort was closed to navigation, and some owners of smaller fishing boats could be 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.