It was supposed to be the celebratory finale of a 10-day international electronic music festival known as BPM, for Bartenders, Promoters, Musicians.
Ticket prices reached $900 or more for a 10-day pass to what promoters lauded on the Internet as "the ultimate festival experience for underground dance music fans, industry professionals, and artists from around the globe."
Instead, authorities said, the party became a bloodbath when a shootout at a club called the Blue Parrot left at least five people dead, 15 injured and temporarily transformed a portion of the tourist destination of Playa del Carmen on Mexico's "Mayan Riviera" into a scene of chaos and panic.
One of the dead was identified as a U.S. citizen.
Police ruled out terrorism as a motive. Gov. Carlos Joaquin Gonzalez of Quintana Roo state, where Playa del Carmen is situated, issued a statement saying initial indications were that two people opened fire at each other as the result of a "personal dispute," prompting security guards to intervene.
"I'd say that no more than four minutes after we got in there we heard what sounded like 10 shots," said Carré Orenstein, 24, a Los Angeles resident who was at the Blue Parrot covering the festival for Mixmag, a dance music media outlet. "Right away, everyone started running."
Hiding with others beneath a counter in the cavernous club, Orenstein said she reflected on recent shootings in the United States, including the attack last June in Orlando, Fla., that left 49 dead at Pulse, a gay nightclub.
"We were hiding, and wondering if the next step is that someone marches in back here," recalled Orenstein, who spoke by telephone after returning home safely to Los Angeles.
Multitudes of young people from the United States, Canada and Europe attended the event -- which attendees described as peaceful and upbeat until the final devastating evening, when the Blue Parrot was one of two venues for music.
At least one female patron was fatally injured in a "stampede" of people fleeing the club, according to Miguel Angel Pech, attorney general of Quintana Roo.
Late Monday, the Mexican prosecutor's office in Quintana Roo said the woman trampled to death was a U.S. citizen, Alejandra Margarita Villanueva. The other fatalities included a Canadian national, Kirk Wilson; an Italian, Daniel Pessina; and two Mexican citizens, Rafael Antonio Penaloza and Geovanni Francisco Ruiz Murillo, both from the southern state of Veracruz, the prosecutor's office said.
The dead included three private security personnel at the scene and two apparent clubgoers, according to authorities and event organizers.
Of the 15 wounded, the governor said, eight had been treated at medical facilities and released, and seven remained hospitalized, one in critical condition.
The injured included at least two U.S. residents and one Canadian, according to Pech.
The Canadian press reported that the Canadian victim, Wilson, was a longtime Toronto-area bouncer who was working security at the event. Social media tributes were pouring in for Wilson, 49, a father of two.
The shooting was an unusual instance of Mexico's entrenched violence intersecting with the nation's booming tourist trade and its often-raucous bar scene.
Video posted on social media showed panicked patrons fleeing from the club as the shooting occurred shortly before 2:30 a.m. — a time when, police said, the dance venue was "saturated" with revelers.
"We heard detonations that we thought were fireworks," recalled Pipe Llorens, 32, a musician from the Mexican city of Torreon, who was at the Blue Parrot with friends. "We turned around and 10 meters away there were bodies thrown on the floor, full of blood. We got very scared, there were people crying. … Everyone jumped on the floor."
Three people arrested nearby were in custody, Pech said, but it was not confirmed if either of the reported initial assailants was among them.
Police found at least 20 bullet shells at the venue from at least three weapons, the attorney general said.
In a statement, organizers of the well-publicized event said the violence erupted in front of the club and confirmed that the fatalities included three members of the event's security team.
Organizers condemned "this senseless act of violence" at the event, which was billed as an annual, post-New Year's electronic music festival held at various venues in Playa del Carmen and attracting thousands of revelers.
BPM was marking its 10th anniversary, with organizers promising a "magical journey" featuring more than 375 artists, including world-renowned DJs. A series of "global pre-parties" preceding the festival was dubbed, "Vamos a la Playa," or "Let's Go to the Beach."
Playa del Carmen and other popular tourist destinations, including nearby Cancun, have generally been spared the drug- and gang-related violence that has ravaged many parts of Mexico. By contrast, the famous tourist destination of Acapulco, on the Pacific coast, has become a battleground for drug traffickers, scaring away many visitors.
But some merchants in the Playa del Carmen area complain that criminals mixed up in the drug trade have increasingly been turning up at resort areas on the Caribbean coast, hawking their illicit wares to tourists and others.
"This was going to happen eventually," said a restaurant owner, who, like others contacted, asked to be identified only by his first name, Carlos, for security reasons. "Playa del Carmen is a paradise that has always been calm, but in recent years bands of delinquents have arrived, dedicated to the sale of drugs — mostly in the bars and nightclubs. They fight for the sale of drugs and also extort the owners of discotheques and bars."
Local officials, worried about a possible drop in tourism — the area's economic life-blood -- pleaded publicly with federal and state authorities to step up enforcement. They expressed fears that rising violence could discourage visitors.
"We want to generate employment in an atmosphere of peace, that tourists find here an ambiance of tranquillity," Maria Elena Mata, president of a "Mayan Riviera" trade group, said in a news conference also attended by local officials. "We ask that the [federal government] help us in maintaining security. We don't want violence to keep on escalating, that other incidents like that of today keep on happening."
Nationwide, tourism is one of the bright spots in Mexico's shaky economy, generating almost $16 billion in revenues between January and October of 2016, according to official figures.
Mexico is bracing for possible economic shocks as the administration of President-elect Donald Trump takes office this week amid threats of new tariffs on goods imported from Mexico and large-scale deportations of Mexicans in the United States illegally.
This month, Mexican President Enrique Peña Nieto lauded the tourism industry as one of the nation's top income generators, accounting for 8.7% of gross domestic product. About 35 million foreign visitors came to Mexico in 2016, the president said, more than tripling the number in 2012.
Among countries in the Americas, Mexican officials said, only the United States receives more annual visitors than Mexico.
Times staff writer August Brown in Los Angeles and Cecilia Sanchez of the Times' Mexico City bureau contributed to this report.
8:15 p.m.: Updated with identities of the dead.
7:10 P.M.: Updates throughout with quotes, details, background.
12:40 p.m.: This article has been updated throughout with Times reporting.
7:45 a.m.: Updated with government statement, and details on the shooting and shooter.
6:32 a.m.: Updated with official statement from Quintana Roo police