The moderate earthquake in Puerto Rico makes January 5th's 5.8 a foreshock (Ed: a tremor that occurs before a larger event, the mainshock). There have been several earthquakes over the past few days along the southern coast of Puerto Rico.
The map below is from the IRIS interactive view, showing earthquakes since Saturday with depth in color (purple = <33 km) and size denotes magnitude. The east circle represents the largest event, which is not quite co-located with the other events.
The focal mechanism shows normal slip event with some strike-slip (Ed: one kind of motion involved in an earthquake, where plates are moving horizontally relative to each other) and the expected seafloor displacement triggered a tsunami warning, which was cancelled.
The following image from Wikipedia views Puerto Rico from the northeast showing the Puerto Rico trench to the north of the island and the less active Muertos Trough to the south of the PR. The recent shallow normal-strike-slip slip seismicity is likely related to the deeper Muertos trough. Like other islands in the northern Caribbean, strain within Puerto Rico is partitioned with off-shore subduction zones and on-shore strike-slip systems.
You've probably seen the reports coming out of Puerto Rico of widespread damage from shaking. The soft first story of many buildings have collapsed. When you think "soft first story," think of vertical posts to support the house so you can park underneath. When the ground shakes, these posts are very unstable.
We will likely learn of more damages and fatalities with time. I hope that the federal government acts quickly to support our fellow citizens in crisis in and not repeat mistakes made after Hurricane Maria.