The quake was centered about 122 miles east of Atka, about 1,200 miles southwest of Anchorage. It was recorded at a depth of 26 miles, the Alaska Earthquake Information Center said.
The quake was felt through the central Aleutians and as far east as Dutch Harbor and Unalaska, but no damage was reported, said Jeremy Zidek, a spokesman with the state Division of Homeland Security and Emergency Management.
"It was shaking, it was just a little rumbly" and lasted about 20 seconds, said Atka resident Rodney Jones.
The West Coast and Alaska Tsunami Warning Center posted a tsunami warning for some coastal areas of Alaska, but canceled the warning about an hour after the quake. The warning covered an area from 80 miles northeast of Dutch Harbor to about 125 miles west of Adak.
Jones said it appeared all of the town's 61 residents took to higher ground when they heard the tsunami warning, which he heard issued over CB radio. The townspeople gathered on a high hill for about an hour, near the city's new water tank.
During their wait for the all-clear signal, he said a priest with the town's Russian Orthodox Church recited prayers.
In Dutch Harbor, longshoreman Jim Paulin said warning sirens caused also caused hundreds of people to begin climbing up a nearby hill.
"Right now there's hundreds of people up on the hilltop," he told The Associated Press before the all-clear was given. "I can look across the bay and see people on another hilltop."
After the tsunami warning was canceled, he said everybody was "calm. It seems like everybody's kind of enjoying it. It's good weather."
Paulin said no one seemed panicked because the city has been evacuated in the past. But, he said, "It's better to be safe than sorry."