The quake hit at approximately 4:54 p.m. and had a depth of 3.6 miles, USGS said. The agency said the quake struck about 3.8 miles from Rialto and 4.5 miles from Fontana.
So far, there have been no immediate reports of significant damage or injuries. A USGS map indicates weak shaking was felt as far north as Victorville and south in San Clemente.
The quake comes after a 4.3-magnitude earthquake rattled the Inland Empire last week, with shaking felt across Southern California.
MORE: What to know about earthquake alerts and MyShake app
MyShake app gets more than 20,000 downloads in 3 hours after Malibu-area earthquake