The storm, packing maximum sustained winds of 120 kilometers (75 miles) per hour, hit land in the state of Chiapas, a rural region with archeological sites near the neighboring state of Oaxaca, the US National Hurricane Center said.
The US man "was dragged by the waves and died" after he ignored a ban on entering the beach in the town of Salina Cruz in Oaxaca, state civil protection director Manuel Maza told AFP.
The second victim was a 27-year-old man who was swept away by an overflowing river in the Oaxaca town of Pinotepa Nacional, Mayor Carlos Sarabia said.
In the state of Guerrero, heavy rains flooded some streets of the resort city of Acapulco, with water levels reaching 52 centimetres (20 inches) and sweeping away at least three cars, an AFP correspondent said.
In Oaxaca, authorities had urged residents to stay home, while the ports of Salina Cruz, Huatulco, Puerto Angel and Puerto Escondido were shut down. Some 200 families were taken to shelters, officials said.
Barbara grew into a category one hurricane – the lowest on the five-level Saffir-Simpson scale – before making landfall 35 kilometers (20 miles) west of the Chiapas town of Tonala, the US hurricane centre said.
The centre said a "prolonged threat of heavy rains" was expected but a "rapid weakening" of the storm would occur late Wednesday and that Barbara would "dissipate within the next day or so."
Mexico's National Water Commission warned that Barbara's winds could affect the neighboring states of Chiapas, Tabasco, Campeche, Yucatan, Quintana Roo, Veracruz and Guerrero.
The storm was moving toward the northeast at 15 kph (nine mph), the US hurricane centre said. Tropical force winds extend outward up to 110 kilometres (70 miles) from the storm's center.
Barbara was forecast to dump up to 25 centimetres (10 inches) of rain over parts of Oaxaca and Chiapas, with as much as 50 centimetres (20 inches) possibly falling in isolated areas of southeastern Oaxaca, the centre said.
"These rains could cause life-threatening flash floods and mud slides," it warned. A storm surge would likely raise water levels by up to 1.5 metres (five feet) on the coast.
In March 2012, two girls died and 25,000 homes were affected when Hurricane Carlotta tore across Oaxaca.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ