The initial earthquake hit at 12:00 a.m. and had a depth of 3.4 miles, according to the USGS.
The quake was centered about 2 miles east-northeast of San Leandro and west-northwest of Castro Valley, the USGS reported.
Two aftershocks of magnitude 2.6 and magnitude 1.7 hit at 12:04 a.m. and 1:06 a.m., respectively.