The Philippines lifted a tsunami alert early on Sunday as waves receded from a magnitude 7.4 earthquake that struck the south of the country, triggering coastal evacuations and some waves in there and in Japan.
There were no initial reports of casualties or serious damage from the quake in the Mindanao region, although some residents reported damage to buildings in the area, which is less populated than some parts of the archipelago.
More than 500 aftershocks were recorded, and the Philippines' Institute of Volcanology and Seismology (Phivolcs) urged caution as people resumed normal activities.
"The tsunami threat associated with this earthquake has now largely passed the Philippines," Phivolcs said in a statement but advised people in threatened communities to heed the instructions from local authorities.
It had earlier urged people living near the coast of Surigao Del Sur and Davao Oriental provinces to move inland.
The national disaster said it was assessing the impact of the quake, with a team on the ground collating information.
The Philippine Coast Guard put all its vessels and aircraft on alert for potential dispatch.
"We started going back to our homes early on Sunday, although we are still shaking because of aftershocks," Julita Bicap, 51, a front desk staffer at GLC Suites hotel in the seaside town of Bislig, said after power was restored around 5am local time.
"There are aftershocks even now. Last night we were at the evacuation centre including my two foreigner guests. One of them came back to the hotel already," Bicap told Reuters, adding that she noticed a small crack in the hotel's front wall.
The largest aftershock was magnitude 6.5, according to the European-Mediterranean Seismological Centre.
Earthquakes are common in the Philippines, which lies on the "Ring of Fire", a belt of volcanoes circling the Pacific Ocean that is prone to seismic activity.
Scores of residents were seen in an evacuation centre in photographs posted on social media by the authorities in Hinatuan province, 30km from the quake's epicentre.
Philvolcs' Hinatuan-Bislig Bay station recorded maximum waves of 0.64 metre. Japan's Hachijojima island, some 290km south of Tokyo, recorded waves of 40cm, the Japan Meteorological Agency said.
The US Tsunami Warning System had initially warned of waves of up to 3m above the usual high tide level.
The quake, which struck at 10.37pm Saturday local time, was at a depth of 25km, Philvolcs said.
James Soria, who owns a small hotel in Hinatuan, said there had been significant damage to his home.
"It's shaking again here now," he told Reuters before the call was disconnected as another aftershock hit.
Cosme Calejesan, 47, said there had been damage to his house in Surigao City 185km from the epicentre, but the structure was intact.
"I was already asleep, but I was woken up by the creaking sounds of my cabinets when the tremor occurred," he said. "It was frightening. It was sudden and abrupt and I was worried for my children."