Two consecutive days of shooting attacks that left a total of nine dead have put two of the jewels of Mexico's Caribbean coast on edge and spurred a warning to tourists by the U.S. government.

As investigators worked Tuesday at the scene of a shooting the previous day that caused five deaths in the nearby beach town of Playa del Carmen, the region was stunned when gunmen assaulted the Quintana Roo state prosecutors' offices in Cancun, and four people were killed.

Authorities attributed both incidents to organized crime, but made no comment on whether they might be linked.

On Tuesday night, two women embraced and cried while looking at a pool of blood and a flickering candle just inside the gate of the state prosecutors' office. A police officer and three apparent attackers were killed as police repelled the afternoon attack and five suspects were detained, Quintana Roo state Gov. Carlos Joaquin said.

The governor pleaded for calm, saying the federal government was sending more security forces to help local and state authorities. "Cancun residents and our visitors can go about their lives," he said in a televised address. "I repeat: The three levels of government protect society."

But central Cancun, which is away from the hotel zone where most foreigners stay, was palpably tense.

Shortly after the gunbattle at the prosecutors' office, a convoy of police trucks streaked toward the gleaming Plaza de las Americas mall where hundreds of fearful shoppers flooded out the exits after people reported hearing gunfire. Soldiers in full battle gear cleared the property.

Later, an official with the prosecutor's office said the mall scare proved to be a false alarm. Although some shoppers reported hearing gunshots, investigators found no sign of any crime there, said the official, who agreed to discuss the incident only if not quoted by name because he was not authorized to speak with press.

The U.S. Consulate in Merida issued an alert about the incidents in Cancun and urged U.S. citizens to take care and "to follow local authorities' warnings and directives and consult with their hotels before leaving the premises."

Authorities released few details about the attack on the prosecutors' office, including the number of attackers or information on those detained.

David Franco waited anxiously with his family outside the office Tuesday night, saying they feared his brother-in-law had been wrongly detained after the shooting. He said the man had phoned his own wife saying he was caught in the middle of a shootout and his car had been hit twice by bullets. The last thing his wife heard was: "They're taking us, they're taking us." But she didn't know who or where.

Franco said the family frantically searched all over Cancun looking for his brother-in-law before learning he was inside the prosecutors' office being questioned. Franco said his brother-in-law was just on his way to work. His car was still double parked about 30 yards down the street.

The Cancun shooting came one day after five people, including three foreigners, died during a shooting at a beachside club during the BPM electronic music festival in Playa del Carmen.

On Tuesday, the hypothesis of drug links to that shooting was strengthened after a banner briefly appeared along a roadside, signed by the "Old School Zetas," part of the fragmented Zetas cartel, suggesting the attack was carried out as part of a battle against rival gangs.

Quintana Roo's attorney general, Miguel Angel Pech, said investigators were looking into whether the banner referred to the BPM festival or one of its organizers.

Pech said authorities were investigating whether extortion, street-level drug sales or a murder plot was the motive behind the shooting, which also resulted in 15 people being wounded or injured.

Standing in front of a memorial of flowers and candles at the Blue Parrot club Tuesday, Ruben Aguinaga of Mexico City tried to make sense of the shooting that had shattered an otherwise fun and happy music festival that he had attended for the third time. Asked if he would come back, Aguinaga said he would have to see.

"That this kind of thing happens pains me," he said. "It makes me sad, it makes me feel powerless, it makes me mad."


Associated Press writer Maria Verza in Mexico City contributed to this report.