PHOTO: CLIPART.COMEARTHQUAKE: Emergency sirens sounded in Kodiak, a town of 6,100 people on Alaska's Kodiak Island, one of the closest settlements to the epicenter.

A magnitude 7.9 earthquake hit the Gulf of Alaska in the early hours of Tuesday, prompting warnings of a possible tsunami down the west coast of North America.

Emergency sirens sounded in Kodiak, a town of 6,100 people on Alaska’s Kodiak Island, one of the closest settlements to the epicenter, Reuters reported.

“This is a tsunami warning. This is not a drill. Please get out to higher ground,” said the announcer on local public radio station KMXT. “If you are on the flats, get up on one of the hills ... Just go high.”

There were no immediate reports of damage or injury.

Evacuation orders were in place in parts of Alaska and as far south as San Francisco as officials urged people who live near the ocean to be ready to flee if needed.

Hundreds of people packed into the high school in Kodiak, one of the closest settlements to the epicenter. Long lines of traffic formed in coastal communities including Homer and Seward, residents warned on social media.

“People are fine,” Neil Hecht, the high school’s assistant principal, said in a phone interview. “Spirits are high. Everyone is doing well here.”

The school stands 164 feet (50 m) above sea level, said Hecht, who added he was unsure if evacuees would have to spend the night there.

Kodiak police warned at 2:29 a.m. local time (1129 GMT) that water was receding from the harbor, a precursor to a tsunami.

“Please heed local warnings to move inland or to higher ground,” Alaska Governor Bill Walker said in a statement.

San Francisco residents who live three blocks from the Pacific Ocean or five blocks from San Francisco Bay were told to prepare to evacuate by the city’s Department of Emergency Management.

The quake, initially measured at magnitude 8.2, hit around 250 km (160 miles) southeast of Chiniak, Alaska at a depth of 25 km at 12:31 a.m. (0931 GMT), the US Geological Survey said.

“If you are located in this coastal area, move inland to higher ground. Tsunami warnings mean that a tsunami with significant inundation is possible or is already occurring,” the Anchorage Office of Emergency Management said in a warning for Alaska and British Columbia.

A tsunami watch for the entire US west coast was issued.

“Based on all available data a tsunami may have been generated by this earthquake that could be destructive on coastal areas even far from the epicenter,” the Pacific Tsunami Warning Center said.

An initial tsunami watch for Hawaii was cancelled.

Japan’s meteorological agency said it was monitoring the situation but did not issue a tsunami alert.