The quake, which hit at a shallow depth of 10km, was centred 63km west of the town of Ferndale, a sparsely populated portion of the northern California coast, the US Geological Survey said.
It was felt as far south as San Francisco, where residents felt a rolling motion for several seconds.
It was followed by smaller aftershocks.
The San Francisco Zoo was evacuated as a result of the earthquake, the zoo said in a post on the social media platform X.
The animals have been secured and staff has been moved to higher ground.
The National Tsunami Center issued a warning for a long stretch of the US west coast, from Dunes City, Oregon, south to San Francisco and San Jose, California, about 643km away.
Tsunami Warning 1 for areas of OR & N. CA: See — NWS Tsunami Alerts (@NWS_NTWC) https://t.co/npoUHxX900 for alert areas. M7.3 045mi SW Eureka, California 1044PST Dec 5 pic.twitter.com/NFCbU5EaKaDecember 5, 2024
San Francisco and a large area of the surrounding Bay Area were under the tsunami warning.
Throughout northern California phones buzzed with a tsunami warning from the National Weather Service that said: "A series of powerful waves and strong currents may impact coasts near you. You are in danger. Get away from coastal waters. Move to high ground or inland now. Keep away from the coast until local officials say it is safe to return."
At least 5.3 million people in California were under a tsunami warning after the earthquake, the US Geological Survey said in a yellow alert, which predicts localised but minimal damage.
with AP