The tsunami warning was lifted without incident a short time later. There were no immediate reports of any deaths or serious injuries.
The governor has issued a disaster declaration and called for help from the National Guard.
(1/2) After a major earthquake, I have issued a declaration of disaster & I have been in direct contact with the White House. Major General Laurie Hummel & I are now working w emergency responders to make sure Alaskans are safe.— Governor Bill Walker (@AkGovBillWalker) November 30, 2018
The U.S. Geological Survey said the first and more powerful quake was centered about 7 miles (12 kilometers) north of Anchorage, Alaska's largest city, with a population of about 300,000. People ran from their offices or took cover under desks.
Cracks could be seen in a two-story downtown Anchorage building, and photographs posted to social media showed fractured roads, as well as fallen ceiling tiles at an Anchorage high school. A large section of an overpass near the Anchorage airport collapsed, marooning a car on a narrow island of pavement next to where the road gave way.
The quake also disrupted electrical service and knocked out traffic lights in Anchorage, snarling traffic.
Cereal boxes and packages of batteries littered the floor of a grocery store, and picture frames and mirrors were knocked from living room walls.
People went back inside after the first earthquake struck, but the 5.8 aftershock about five minutes later sent them running back into the streets.
A tsunami warning was issued for the southern Alaska coastal areas of Cook's Inlet and part of the Kenai peninsula. Kodiak police on Kodiak Island warned people in the city of 6,100 to "evacuate to higher ground immediately" because of "wave estimated 10 minutes."
Michael Burgy, a senior technician with the National Tsunami Warning Center in Palmer, Alaska, said the tsunami warning was automatically generated based on the quake's size and proximity to shore. Scientists monitored gauges to see if the quake generated big waves. Because there were none, they canceled the warning.
In Kenai, southwest of Anchorage, Brandon Slaton was alone at home and soaking in the bathtub when the earthquake struck. Slaton, who weighs 209 pounds, said it created a powerful back-and-forth sloshing in the bath, and before he knew it, he was thrown out of the tub by the waves.
His 120-pound mastiff panicked and tried to run down the stairs, but the house was swaying so much that the dog was thrown off its feet and into a wall and tumbled to the base of the stairs, Slaton said.
Slaton ran into his son's room after the shaking stopped and found his fish tank shattered and the fish on the floor, gasping for breath. He grabbed it and put it in another bowl.
"It was anarchy," he said. "There's no pictures left on the walls, there's no power, there's no fish tank left. Everything that's not tied down is broke."
Alaska earthquake: Photos show damage to roads, businesses in and around Anchorage
Alaska averages 40,000 earthquakes per year, with more large quakes than the 49 other states combined. Southern Alaska has a high risk of earthquakes because of tectonic plates sliding past each other under the region.
Alaska has been hit by a number of powerful quakes over 7.0 magnitude in recent decades, including a 7.9 that hit last January southeast of Kodiak Island. But it is rare for a quake this big to strike so close such a heavily populated area.
David Harper was getting some coffee at a store when the low rumble began and intensified into something that sounded "like the building was just going to fall apart." Harper ran to the exit with other patrons there.
"The main thought that was going through my head as I was trying to get out the door was, 'I want this to stop,'" he said. Harper said the quake was "significant enough that the people who were outside were actively hugging each other. You could tell that it was a bad one."
On March 27, 1964, Alaska was hit by a 9.2 earthquake, the strongest recorded in U.S. history, centered about 75 miles (120 kilometers) east of Anchorage. The quake, which lasted about 4 minutes, and the tsunami it triggered claimed about 130 lives.