An earthquake has struck off the Indonesian island of Sumatra, prompting a temporary tsunami warning and panic among residents.

The quake was six miles deep and its epicenter was 502 miles southwest of Padang, according to the US Geological Society.

It struck at around 6:50pm local time, was felt at least as far away as Malaysia and Singapore and had initially been recorded at 8.2.

Heronimus Guru, deputy head of operations for the country's search and rescue agency, initially said there were casualties but then said "there is no information about deaths".

A tsunami warning was issued for parts of Sumatra, including West Sumatra, North Sumatra and Aceh shortly after the quake but, around an hour later, local channel TVRI reported that the warning had been cancelled.

The quake was felt strongly in Padang in West Sumatra for a few seconds, according to a journalist in the city for news agency AFP.

People ran out of their homes to higher ground and there were reports of patients being moved from hospitals, traffic jams and general panic.

Australia's Bureau of Meteorology issued a marine warning for distant Cocos and Christmas islands, saying strong and dangerous currents were possible and people should secure boats and avoid waterfront areas.

A tsunami watch was issued for parts of Western Australia but has since been cancelled.

Indonesia was badly hit by the Indian Ocean tsunami in 2004, which killed more than 170,000 people in the country and thousands of others in surrounding nations.

Indonesia straddles the Pacific "Ring of Fire", a region where different plates on the earth's crust meet, creating a large number of earthquakes and volcanoes.

Click for more from Sky News.