The US Geological Survey said the quake struck at 03:20 local time four miles north-west of the town of American Canyon, at a depth of 6.7 miles.
At least 87 people have been taken to hospital in the Napa area, with three of them seriously injured.
California Governor Jerry Brown has declared a state of emergency in order to deal with the effects of the quake.
Officials in Napa said in a statement that the quake had destroyed four mobile homes and made 16 buildings “uninhabitable”, as well as causing “approximately 50” gas main breaks and around 30 leaks from water mains.
Three historic buildings in the town had been hit and two commercial buildings “severely damaged”, the statement went on.
More than 10,000 households were without power in Napa, about six miles from the earthquake’s epicenter, and the surrounding area, the Pacific Gas and Electric Company said.
A Red Cross evacuation centre has been set up in a church in the city.
The California Highway Patrol in the San Francisco Bay area tweeted that it was “checking over crossings and bridges for obvious signs of structural integrity”, and asked residents to report any signs of problems.
The site of the earthquake was 51 miles from Sacramento and about 30 miles north-east of San Francisco, where many Twitter users say the earthquake woke them up.
Numerous small aftershocks were also reported on Sunday.
California lies on the San Andreas Fault, which forms the tectonic boundary between the Pacific Plate and the North American Plate, two of the large moving plates that form the Earth’s crust.
The San Francisco earthquake of 1906 and subsequent fires devastated the city.
In 1989, a powerful earthquake struck San Francisco, killing more than 60 people and injuring hundreds.
Bk3nz-3Tu8QThe US House Ethics Committee has voted to release its report on former Republican Representative…
ABC News has agreed to pay $15 million to President-elect Donald Trump to settle a…
South Korea’s parliament has voted to impeach President Yoon Suk Yeol over his failed attempt…
Israeli war planes have carried out more than 100 air strikes in Syria on December…
President-elect Donald Trump has threatened to impose 100% tariffs on the BRICS countries if they…
Syrian troops have withdrawn from the city of Aleppo following an offensive by rebels opposed…