At least five people have been killed, three of them foreigners, when a gunman opened fire outside the Blue Parrot nightclub in the Mexican resort town of Playa del Carmen during the BPM electronic music festival, police say.
More than 2000 people were said to be in the club at the time of the attack, many of them Australians. The festival is popular with foreign tourists.
Rodolfo Del Angel, director of police in the state of Quintana Roo, said the early morning shooting was the result of "a disagreement between people inside" the nightclub and that security guards came under fire when they tried to contain the dispute.
BPM organisers said three members of their security team were killed in the attack, which it said was carried out by a lone shooter, early on Monday morning local time. Fifteen people were injured.
"We are overcome with grief over this senseless act of violence and we are cooperating fully with local law enforcement and government officials as they continue their investigation," BPM said in a statement posted on its Facebook page.
Perth man Tim Mullen told ABC News he was inside the Blue Parrot nightclub when the shooting happened.
"About four or five hours into the party we heard a couple of 'pops' going off, and we at first thought it was fire crackers and we looked across the dance floor to establish whether or not anything was going off that we needed to see and when we didn't see any fireworks we started thinking the worst," he said.
"[There was] lots of screaming and lots of people were running around but we stayed put and as soon as we saw 30 or 40 people get out safely through the main exit, we decided to do a runner."
Mr Mullen said: "We had to go over a few of the victims just to get through the melee, there were people all exiting at once," he said.
"One of the guys that was at the party with us administered first aid.
"It's been such an amazingly wonderful festival ... everybody is sad about the fact that the week has been blackened by such a violent act."
Video footage showed people running from the Blue Parrot club and ducking for cover.
"This is a very, very sad situation. Tryna (sic) get my head around it still. Thoughts and condolences to all affected," Scottish DJ Jackmaster, who was performing at BPM, said on Twitter.
It was entering its 10th year and has grown to be one of the most important electronic music events in the world, with top DJs flying in every January to play the clubs of Playa del Carmen along Mexico's Caribbean coast.
Shootings in Mexican clubs are not unusual and are often linked to gang violence, but the venues targeted are normally those frequented by gang members rather than tourists.
Quintana Roo and the surrounding Yucatan peninsula have traditionally been less violent than other parts of Mexico, with relatively low murder rates.
- ABC / AFP