Yesterday's shooting at the Blue Parrot club during the BPM electronic music festival rocked Playa del Carmen, a peaceful Caribbean seaside town.
While the resort -- popular among American, Canadian and European tourists -- has been spared from the gang violence plaguing other parts of Mexico, drug dealers regularly approach foreigners to sell them narcotics.
The shooting "could be a case of small-time drug dealers fighting for control" of turf, said Miguel Angel Pech, attorney general of Quintana Roo state.
The victim's bodyguards or people protecting him fired back "to repel the attack", Pech told the Televisa network.
More From This Section
When the shooter fled the club, he hit another person who was also armed and whose gun went off when he fell, hitting other people, Pech said.
A Canadian man and an Italian man, both of whom worked for the BPM electronic music festival, and a Mexican man, died from bullet wounds.
An American woman was trampled to death in a stampede as people fled the club in panic. Fifteen other people were wounded by bullets or hurt in the stampede.
Authorities are investigating the background of the Mexican victim, who is originally from the eastern state of Veracruz. His family said he worked for a phone company and that he was related to a Veracruz state government official.
While authorities have surveillance camera footage, it is insufficient to identify the shooter, Pech said.
Authorities had suggested yesterday that the shooting was linked to a personal conflict between two people. Earlier, they reported that the gunfire erupted after the gunman was denied entry at the club.