A magnitude-7.3 earthquake struck west of Indonesia's Sumatra island on Tuesday, the country's geophysics agency said, triggering a tsunami warning for about two hours.

Iran PressAsia: The tsunami warning, asking local authorities to immediately instruct residents of the affected area to move away from shores, has since been lifted.

The European-Mediterranean Seismological Centre (EMSC) earlier pegged the quake at 6.9 magnitude.

The quake, at a depth of 84km, hit at about 3am local time. Aftershocks were detected, with one registering magnitude-5, the local agency said.

Indonesia's disaster mitigation agency said authorities were collecting data from the islands nearest the epicentre off the western shore of Sumatra, spokesman Abdul Muhari said.

In Padang, the capital of West Sumatra, the quake was felt strongly, and some people moved away from the beaches, said Mr Muhari, who was in Padang.

Local news footage showed some Padang residents leaving by motorbike and foot to higher ground.

Some carried backpacks while others huddled together under an umbrella against the rain. 219