WELLINGTON (Reuters) - People living in coastal areas of New Zealand closest to a huge earthquake that struck offshore early on Friday were temporarily ordered to evacuate due to fears of a tsunami.

The magnitude 7.1 quake struck at 4:37 a.m. (1637 GMT) at a depth of 55 km (34 miles), 130 km north-east of Te Araroa, off the North Island, according to government earthquake detection service Geonet.

People in and around the town of Gisborne, the largest populated area nearest the epicentre, were told to get to higher ground or go as far inland as they could in case the shock caused a freak wave.

The evacuation order and tsunami warning were lifted a few hours later.

Authorities in Gisborne said people could return home but were “strongly advised” to stay off the beaches.

People in North Island reported on Twitter being woken by shaking and local media said there were some power outages.

While the area continued to be hit by aftershocks of magnitude 5 and above, Tairawhiti Civil Defence Emergency Management controller John Clarke said if people feel another long and strong earthquake they should again head for higher ground or as far inland as possible.

The U.S. National Tsunami Warning Centre and the Chilean Navy said there was no danger of a tsunami on the Pacific coasts of the Americas.

Ahead of the stock market opening, traders did not expect the quake to have an impact.

“The market reaction to the news of the 7.1 magnitude earthquake was very muted as it appears there has been no reported damage or tsunami,” said Stuart Ive of OM Financial Ltd.