According to the U.S. Geological Survey, the quake struck at 11:50 a.m. about 12 miles south-southeast of Weldon and had a depth of less than a mile.
Nine minutes later, a 3.6-magnitude aftershock rattled the same area.
Some Eyewitness News viewers on Twitter said they felt the quakes. One viewer said she felt shaking in Bakersfield.
There were no immediate reports of damage or injuries.