A 6.7-magnitude earthquake struck off Indonesia's main island of Java on Thursday, the US Geological Survey said, sending people running into the streets in panic.
There were no immediate reports of damage and no tsunami warning was issued after the quake struck at 11:47 pm (1647 GMT) at a depth of 11 kilometres (6.8 miles) in Indonesian waters some 170 kilometres east of Australia's Christmas Island.
The quake was felt strongly in Kawalu, West Java province, according to hotel security guard Asep, who goes by one name.
"Some staff ran out into the streets," he said. "The quake was strong, but it only lasted around five seconds. I can't see any damage."
It was also felt in Ciamis, West Java province, a hotel worker said.
"Our guests who hadn't gone to bed yet ran outside in a panic. But there's no damage that I can see and everything is back to normal," said Warmansyah, who works at the Priangan guesthouse and goes by one name.
Tall buildings swayed gently in the Indonesian capital Jakarta, around 420 kilometres north of the quake's epicentre.
The Indonesian Meteorology, Climatology and Geophysics Agency said there was no potential for a tsunami.
"There are no immediate reports of damage or casualties, but we know the quake was felt in several parts of Java," an agency spokesman told AFP. "There is no potential for a tsunami."
The Pacific Tsunami Warning Center did not issue an alert after the quake.
Indonesia sits on the Pacific "Ring of Fire" where continental plates collide, causing frequent seismic and volcanic activity.
A massive quake struck off Aceh in 2004, sparking a tsunami that killed 170,000 people in the province on Sumatra and tens of thousands more in countries around the Indian Ocean.