The storm came ashore in Oaxaca state Monday afternoon as a strong Category 2 hurricane, with maximum sustained winds of 105 mph (165kph), then it quickly lost power as it moved inland over the mountainous interior.
Agatha was downgraded to a tropical storm late Monday, its sustained winds down to 70 mph (110 kph). The U.S. National Hurricane Center said the storm should dissipate overnight, but warned that the system's heavy rains still posed a threat of dangerous flash floods for Mexico's southern states.
Torrential rains and howling winds whipped palm trees and drove tourists and residents into shelters. Oaxaca state's civil defense agency showed families hustling into a shelter in Pochutla and a rock and mud slide that blocked a highway.
Heavy rain and big waves lashed the beach town of Zipolite, long known for its clothing-optional beach and bohemian vibe.
"There is a lot of rain and sudden gusts of strong wind," said Silvia Ranfagni, manager of the Casa Kalmar hotel in Zipolite. Ranfagni, who decided to ride out Agatha at the property, said, "You can hear the wind howling."
In the surfing town of Puerto Escondido, people took shelter and put up plywood to prevent windows from breaking in the strong winds.
The government's Mexican Turtle Center - a former slaughterhouse turned conservation center in Mazunte - closed to visitors because of the hurricane.
Agatha formed only on Sunday and quickly gained power. It was the strongest hurricane on record to make landfall in May in the eastern Pacific, said Jeff Masters, meteorologist with Yale Climate Connections and the founder of Weather Underground.
He said the region's hurricanes typically get their start from tropical waves coming off the coast of Africa.
"Since the African monsoon typically does not start producing tropical waves until early- or mid-May, there simply aren't enough initial disturbances to get many eastern Pacific hurricanes in May," Masters wrote in an email. "In addition, May water temperatures are cooler than they are at the peak of the season, and wind shear is typically higher."