A magnitude-5.8 earthquake rocked the U.S.-Mexico border region Wednesday, prompting the evacuation of hospitals in the Mexican industrial city of Mexicali and causing buildings to sway more than 160 kilometres away in San Diego and southwestern Arizona.

There were no reports of injuries or major property damage.

The main quake was centred about 30 kilometres southeast of Mexicali, according to the U.S. Geological Survey. It was followed quickly by a 4.9-magnitude quake and at least nine other aftershocks.

In Mexicali, five hospitals were briefly evacuated, 90,000 customers lost electricity for 14 minutes and cellphones failed to work for 20 minutes, said Rene Rosado, director of the city's civil defence.

City government offices closed for the day after the quake struck at 10:48 a.m. local time.

"People were very frightened throughout the city," Rosado said.

Minor damage in Mexicali

There was "minor damage" to several buildings in Mexicali, a city of 750,000 people and capital of Baja California state, said Alfredo Escobedo, the state civil defence director.

In Calexico, a California city of 40,000 people across the border from Mexicali, crews found no damage to bridges, buildings or roads, said city manager Victor Carrillo.

"Basically it was a quick, shake-and-bake, jolt-type of thing that seemed to last 15, 20 seconds, 30 seconds at the max," said Carrillo, who was in a meeting at City Hall during the quake.

"I have quite a few items on the shelves in my office and they're all intact," he said.

In Yuma, Ariz., Sally Zeller, a waitress at Brownie's cafe, said she and most everyone in her restaurant felt the quake for several seconds.

"It rumbled under our feet and the soup counter rumbled against my hip," Zeller said. "The chandeliers were swaying. It was like, 'Whoa!"'

The quake occurred 6.9 kilometres deep and was considered a shallow quake, which has the potential to cause more damage than deeper ones.