A woman was among three people killed when someone opened fire outside a bar in El Socorro on Saturday morning.
A police officer was also injured in the fracas and is at hospital.
He was beaten by the angry mob when he sought to bring calm to the escalating situation before the shots were fired.
It was not immediately clear who was responsible for firing the shots. Investigators said they would have to view video footage of the incident that was captured on nearby CCTV cameras to determine whether it was the officer, who was off-duty at the time, or someone in the crowd.
That incident took place around 5.30 a.m. outside the bar located along Upper El Socorro Road, San Juan.
Reports state that during the fracas, the police sergeant intervened but the mob turned on him and began physically assaulting him. As the officer fell to the ground, some members of the group continued kicking him to the chest and head.
Another group of individuals attempted to come to his assistance but as they were about to do so, shots rang out, said police. Members of the crowd began scampering.
It was discovered that two men and a woman had been shot.
The men, whose identities were not released, died at the scene. The injured woman, who has since been identified as Ria John, and the police sergeant were both taken to hospital for treatment.
John died at around noon.