An earthquake with a magnitude of 6.7 struck early Monday in the Indian Ocean south of the Indonesian island of Java, the US Geological Survey said.

The epicentre was 24 kilometres (15 miles) miles deep, it said, after initially estimating it at 10 kilometres underground, and 277 kilometres south of the Javanese coast.

Indonesian seismologists put the magnitude at 7.1 and issued a tsunami warning, saying the tremor had the potential to cause a killer wave and asking recipients of its public alert SMS to warn others of the danger.

"This quake roused people from their sleep. We have not received any reports of damage or casualties so far."

Residents of Cilacap ran out of their homes into the streets when the quake struck, according to the local detikcom website.

The US Pacific Tsunami Warning Centre said that there was no risk of a widespread destructive wave, but there was a "very small possibility of a local tsunami".