The two quakes, which were centered in El Cerrito, occurred in what seismologists call a cluster area. The first shock triggered the second, which is typical for the Hayward Fault, seismologists say.
When a cluster of earthquakes occur in the same location and very close together in time, the biggest one's called the main shock and the ones that precede it are called foreshocks.
A magnitude 2.9 hit at 5:33 a.m., and a magnitude 4.0 struck in nearly the same location seconds later. The quakes did not cause any significant damage.
"This cluster has been fairly active. There have been 18 earthquakes magnitude 2.9 or larger there in the last 40 years," said Robert Uhrhammer of the UC Berkeley Seismological Laboratory.
That "tells us that there's earthquakes relieving strain energy in little pockets along the Hayward Fault system," Uhrhammer said.
Seismologists consider the Hayward Fault the most likely to cause a major quake in the Bay Area. If that happens, the damage could be devastating because so many people live right on top of it.
The Hayward Fault stretches all the way from the tip of San Jose to San Pablo Bay and through Fremont, Hayward, San Leandro and Berkeley.
Small quakes like Monday's are considered statistically insignificant. Most quakes of a 4.0 magnitude don't do much damage, and even a magnitude 6.0 earthquake tends to relieve no stress in the larger picture, Uhrhammer said.
For a big-picture look, the 1906 earthquake and Loma Prieta accounted for roughly 99 percent of all the earthquake energy released in a little over the last 100 years.