One man died and another was hospitalised Monday after a fire caused by a powerful quake off Taiwan that set buildings shaking in the capital Taipei and sparked a short-lived tsunami warning in far southwestern Japan.

Japanese forecasters had warned the 6.6 magnitude earthquake could cause a tsunami as high as one metre (three feet) affecting several islands in the Okinawa chain. But they lifted the alert around an hour later, with no abnormal waves recorded.

No damage was reported in Japan, but a four-storey apartment building in New Taipei City caught fire after an electrical box outside the block exploded in the quake.

A 65-year-old man who lived in the building "showed no signs of life" at the scene, the fire service said.

Another 18-year-old resident remains in hospital with smoke inhalation but is not in a serious condition, the fire service said.

Residents and office workers were evacuated from a building in central Taipei because of a feared gas leak and vehicles in a nearby multi-storey carpark were overturned, but no one was injured.

Three more quakes rocked the island in the evening. The Seismology Center said one with a magnitude of 5.8 and another at 5.7 -- both considered to be aftershocks -- shook buildings in Taipei.

Another quake with a magnitude of 5.5, with its epicenter 42 km (27 miles) east of the eastern city of Hualien, also jolted the island. This was not seen as an aftershock.

There were no immediate reports of damage.

In Japan, local authorities urged people to move away from the coast and seek higher ground, in a drill that has become fairly regular in a country prone to powerful earthquakes and occasional devastating tsunamis.

"We are issuing warnings via the radio," Satoshi Shimoji of the Miyako City government told NHK. "We want residents to get as far as possible from the sea."

Boats were seen sailing out to sea -- common practice when a tsunami warning is issued because away from the coast a tsunami is little different from a swell.

Story continues

However, an hour after the quake, the Japan Meteorological Agency cancelled the warning.

The US Geological Survey said the 6.6 magnitude quake, which Japanese authorities had originally put at 6.8, struck 71 kilometres (44 miles) east of Hualien at 0143 GMT.

In Tokyo, Chief Cabinet Secretary Yoshihide Suga told reporters officials were still collecting information, but that the quake did not appear to have done serious damage.

Japan sits at the confluence of four of the earth's tectonic plates and records more than 20 percent of the planet's most powerful earthquakes every year.

Strict building codes and a long familiarity with the dangers mean quakes that might cause devastation in other parts of the world are frequently uneventful in Japan.

However, more than 18,000 people were killed by a huge tsunami that smashed into the northeast coast in 2011 after a huge 9.0 magnitude earthquake.

Kuo Kai-wen, chief of Taiwan's Seismology Centre, warned there could be more quakes on the island.

"This was the third quake measuring more than 6.0 magnitude in Taiwan so far this year -- we would not rule out the likelihood that there might be more strong quakes of this scale."