A shooting erupted at an electronic music festival in the Mexican resort of Playa del Carmen early Monday, leaving at least five people dead and sparking a stampede, the mayor said. Fifteen people were injured, some in the stampede, after at least one shooter opened fire before dawn at the Blue Parrot nightclub during the BPM festival, Mayor Cristina Torres told Turquesa radio. Three of the dead are foreigners, said Torres, mayor of the municipality of Solidaridad, which includes the popular beach resort. "For the moment we have indications that one person opened fire," Torres said, adding that authorities were contacting the US, Canadian and Colombian consulates to provide information about their citizens' conditions. She said the shooting appeared to have taken place inside the club, causing people to flee in panic. Other witnesses said it happened outside the club. Playa del Carmen is 68 km south of Cancun. The region, popular among American and European tourists, has been largely spared from the drug violence plaguing other parts of Mexico. An editor for the London-based music magazine Mixmag who was in the backstage area of the Blue Parrot said at least four or five shots were fired at around 2:45 (0745 GMT) or 3 a.m., indicating that it happened in front of the club. "People started running because there's an exit in the back. We stopped and hid behind a cement wall, then crawled under a metal table," Valerie Lee, Mixmag's US digital editor, was quoted as saying by the magazine. "Security guards at first didn't think it was shots and kept claiming it was fireworks, saying everything was OK. Then people kept running and said they saw a gun. We kept hiding until they opened the back gate and we ran outside," Lee said. Lee wrote on Twitter that the music was still playing five minutes after the shots were heard. The music, she said, was "super loud, likely those inside didn't even hear." She said friends outside the entrance were just six meters from the shooter. "Bodies on the ground. Didn't seem like shooters tried to enter the party," Lee wrote. "Police took over 10 minutes to arrive. Victims likely include tourists/party goers, poss (possibly) a security guard." Images shared on social media showed people cowering or running down the street. The BPM Festival issued a statement on Facebook saying the attack was perpetrated by a lone shooter in front of the club. "The violence began on 12th Street in front of the club and three members of the BPM security team were among those whose lives were lost while trying to protect patrons inside the venue," the statement said. The festival said organizers have been working with local authorities throughout the event to ensure public safety. "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," the statement said.