The earthquake promoted a tsunami warning that was cancelled after a few intense hours, allowing people to return home from shelters.There were no immediate reports of damage.
The quake hit 256km southeast of Chiniak, on the southern Alaskan coast, at a depth of 10km, the US Geological Survey says.
There was no tsunami threat to New Zealand.
New Zealand Civil Defence said they had assessed the information with the assistance of science advisers. Based on current information, the initial assessment is that the earthquake is unlikely to have caused a tsunami that will affect New Zealand. Coastal inundation (flooding of land areas near the shore) is not expected. Strong currents and surges may be experienced for the 24 hour period from midday, 24th January.
The quake prompted a tsunami warning for parts of Alaska and Canada and a tsunami watch for the entire US west coast, the US Tsunami Warning System said.
Nataniel Moore, who was on a boat in Kodiak, told CNN he felt it "shake really good for a minute". He and others on the commercial fishing boat left the vessel after the earthquake to get to higher ground.
"The whole town is evacuating," he told CNN.
Officials in Anchorage warned coastal areas there was an "extraordinary threat to life or property".
The tsunami alert told people to seek refuge on higher ground in affected areas.
Kodiak man Eric Cusson told the Anchorage Daily News hundreds of cars had driven up Pillar Mountain, the site of the town's utility-scale wind turbines.
"Pretty much everyone in town went up Pillar Mountain," he said.
Kodiak police said officers reported water receding from the harbour and residents should remain in place and await further updates. A local high school was opened as a shelter.
The San Francisco Department of Emergency Management warned residents within three blocks of the Pacific Coast or within five blocks of the San Francisco Bay to be ready to evacuate if necessary.
Wendy Bliss Snipes, told CNN that the earthquake was felt for at least a minute before the real rolling started.
The US National Weather Service said a tsunami warning was in effect for the coasts of British Columbia and Alaska while the US west coast and Hawaii were on tsunami watch.