A 7.7-magnitude earthquake has struck the northern part of the island of Sumatra in Indonesia, according to the U.S. Geological Survey, triggering a brief tsunami warning that send residents scrambling to higher ground.

The quake struck at 5:15 a.m. local time, the USGS said. Its epicentre was about 205 kilometres northwest of Sibolga, on Sumatra, and 1,425 km northwest of Jakarta.

The agency said the quake's depth measured 46 kilometres.

The Indonesia Meteorology and Geophysics Agency issued a tsunami warning immediately following the quake, but lifted it two hours later.

The Pacific Tsunami Warning Center in Honolulu also issued a tsunami watch, although it said no tsunami threat existed for other coastal areas in the Indian Ocean.

Fauzi, an official at the meteorology agency's Jakarta office who uses a single name, said there were no immediate reports of damage or casualties but officials were monitoring the situation.

Local media reports said the quake, which struck as people in the region were preparing for morning prayers, caused panic in North Sumatra's capital of Medan and other cities in the province. Electricity was cut in Medan.

People in some cities along the southeastern coast of Sumatra as well as Sinabang on Simeulue island and Gunung Sitoli on nearby Nias island poured into the streets and rushed to higher ground, reports said.

Japan's Kyodo news agency reported blackouts in Medan and Banda Aceh, the capital of Aceh Province.

The 2004 South Asian tsunami was set off by a magnitude 9.1 earthquake centred off the coast of Sumatra.

It swept across the Indian Ocean in a matter of hours, striking coastlines as far away as South Africa. The wave killed an estimated 227,898 people and caused hundreds of millions of dollars in damage.

Entire communities were swept away in Indonesia, Thailand, Sri Lanka and Myanmar, while deaths were reported in India and the east coast of Africa. Indonesia was by far the worst affected area, particularly the province of Aceh.

People from around the world contributed cash and donated relief supplies to help victims of the tsunami. The United Nations estimated that the relief operation would be the costliest in human history.