The temblor at 10:19 a.m. was 31 miles west of Anchorage and 15 miles northeast of the village of Tyonek.
The West Coast and Alaska Tsunami Warning Center says the quake did not generate a tsunami.
There were no immediate reports of damage.

Janelle Baker, administrative assistant and human resources manager for the Tyonek Native Corp., said there was no damage in her village of 154 on the northwest shore of Cook Inlet, 43 miles southwest of Anchorage.

"It was scary, especially being in the office," she said. "It was a pretty big jolt."