Citing local media who had seen the police report, the Mexican news site 24 Horas said Mr. Wilson was found lying on his back, wearing black pants and a black shirt with the initials BPM.

The report noted that he had “long rasta hair.”

Mr. Forester said his friend cut a striking figure while on duty, a husky 6-foot-6 man with long dreadlocks coming down his back, which earned him the nickname “Kirk with the dreads.”

A Hamilton native, Mr. Wilson was in his mid-40s. He had worked two decades doing security at high-profile Toronto nightclubs such as Rebel and the now-defunct The Guvernment.

He also worked as a personal bodyguard for visiting celebrities, Mr. Forester said.

Mr. Wilson was among the security staff brought in from Canada by the BPM, an electronic dance festival founded a decade ago by two Canadian promoters, Craig Pettigrew and Phillip Anthony Pulitano.

“Three members of the BPM security team were among those whose lives were lost while trying to protect patrons inside the venue,” the festival organizers said in a statement Monday.

Peter Donaghy, an American photographer present at the Blue Parrot, also praised the work of the security staff.

Mr. Donaghy would not comment when contacted by The Globe but, on his Twitter account, he said he heard five gunshots, a pause, then three more shots.

The security guards moved towards the gunfire to keep the patrons safe, Mr. Donaghy wrote.

“The #blueparrot security at #bpmfestival stood up for us when there was gunfire they are the real heroes,” he said.

The attorney-general of Quintana Roo state, Miguel Angel Pech, said a lone gunman apparently entered the nightclub and began to exchange fire with another person inside. Festival security personnel tried to stop the shooting and came under fire.

Mr. Pech said it was not any kind of terrorist attack. He said an Italian and a Colombian were also among the deceased.

At least 15 people were injured, Mr. Pech said, including one Mexican woman who was seriously injured. He said five of the injured – including two U.S. citizens and one Canadian – had been treated for less serious injuries at local hospitals and released.

BPM – which stands for “Bartenders, Promoters and Musicians” – was wrapping up early Monday when the violence erupted.

Global Affairs Canada said Monday it was able to confirm at least one Canadian fatality and was looking to verify the report about the second death.

“Consular officials in Playa Del Carmen and Mexico City are in ongoing contact with local authorities as they continue to address this tragic incident, and are providing consular assistance to Canadian citizens affected by the incident, including two who have been injured,” spokeswoman Jocelyn Sweet said in an e-mail.