An earthquake of magnitude 5.0 struck off the coast in Los Angeles and was felt across the metropolitan area, the U.S.