There were no reports of injuries or major property damage. However, there was minor damage to several buildings in Mexicali.
In Calexico, a California city across the border from Mexicali, crews found no damage to bridges, buildings or roads.
''It was a good jolt and it lasted for several seconds. It seemed like it was a minute. But it started off with a slow rumble and then it hit us with a nice strong jolt, and it shook, at least here in the sheriff's office, the building itself,'' said Imperial County Undersheriff Fred Miramontes.
In Mexicali, five hospitals were briefly evacuated, 90,000 customers lost electricity for 14 minutes and cell phones failed to work for 20 minutes, said Rene Rosado, director of the city's civil defense.
The quake was widely felt in San Diego, where buildings briefly swayed. At the downtown City Hall building, occupants felt about 30 seconds of sustained shaking.
The quake was also felt in San Bernardino, Orange County, Los Angeles, and Las Vegas.
Two smaller quakes preceded the main shock, which was initially reported at magnitude-5.9 before being downgraded slightly.
The quake was centered in a seismically active desert valley near cities with low-rise buildings.
It occurred 4.3 miles deep and was considered a shallow quake. Shallower quakes have the potential to cause more damage than deeper ones.
Scientists at the California Institute of Technology said it was a textbook seismic event -- two foreshocks, the big earthquake and then a series of aftershocks.
A quake the size of Wednesday's main shock rattles the region about every 10 years, said Kate Hutton, a seismologist at Caltech.
The Associated Press contributed to this report.