A tsunami warning has been triggered and homes and businesses damaged after an earthquake struck close to Anchorage, Alaska.

The 7.0 magnitude earthquake was located about 13km north of Anchorage and struck at 8:29 am local time, the US Geological Survey said.

Residents of Anchorage, the largest city in the state, posted pictures and videos to Twitter of damage to their homes and shops.

The quake and several aftershocks shattered windows, toppled groceries from store shelves, and knocked out power to many residents.

A tsunami warning was issued for the Cook Inlet and the Kenai Peninsula.

The Pacific Tsunami Warning Center said no destructive Pacific-wide tsunami was expected, and there was no threat to Hawaii.

"Everyone just sprinted out of the coffee shop I was at in Anchorage in the middle of a huge earthquake," Nat Herz, a reporter with Alaska's Energy Desk, posted on Twitter.

"Car alarms going off, etc. But not seeing any serious damage here aside from random stuff falling over. People going back to computers, meetings," Herz said.

The Anchorage Daily News said the quake caused damage at the newspaper, cracking walls and damaging ceiling panels.

The University of Alaska said it was closing for the day.

"All non-essential personnel should go home," it said in a tweet.

Anchorage airport temporarily halted incoming and outgoing flights after the air control tower was evacuated.