The quake lasted for about 15 seconds. The US geological survey had earlier reported it as a 5.4-magnitude, but later downgraded it to 5.1.
Hours before, a 3.6-magnitude tremor hit the same spot, according to the USGS.
Last week, a 4.4-magnitude earthquake had hit about 15 miles north of downtown Los Angeles. However, Friday's quake was stronger and lasted longer. Twenty years ago, a 6.7-magnitude killed 57 people in the greater Los Angeles area and caused heavy damage.