The country's meteorology and seismology agency warned that with a preliminary magnitude of 7.2 it was strong enough to cause a tsunami. There were no immediate reports of giant waves.
Hasim Rumatiga, a local health official, said electricity went off and residents ran to higher ground.
Indonesia straddles a chain of faultlines and volcanoes known as the Pacific ``Ring of Fire'' and is prone to seismic activity.
A huge quake off western Indonesia caused the 2005 Asian tsunami
that killed around 230,000 people.
(Copyright 2009 by The Associated Press. All Rights Reserved.)