A map shows the intensity of Tuesday night's earthquake near Bakersfield. Shaking was felt throughout Santa Barbara County. Many residents received cellphone alerts just before the shaking started. Credit: Screenshot via USGS

Santa Barbara County felt the shaking from a 5.2-magnitude earthquake in Kern County on Tuesday night.

The initial earthquake was followed by more than a dozen aftershocks, according to the U.S. Geological Survey.

The earthquake was reported at 9:09 p.m. in Lamont, near Bakersfield, about 73 miles from Santa Barbara.

Some residents reported getting a cellphone alert to drop and cover just before the shaking started in Santa Barbara County.

People felt the earthquake all over California, from Fresno to Santa Maria to Temecula, according to the USGS.

The USGS ShakeAlert system estimated that the initial earthquake would be at or above a magnitude 5, so the agency sent emergency alerts to cellphones through the MyShake app, to Android phones and the Wireless Emergency Alert (WEA) system, USGS said.

A tsunami is not expected from this earthquake event, according to the National Weather Service.