The quake caused brief panic among residents, although there was no tsunami alert issued.
The magnitude 6.0 natural disaster hit about 4am Bali time, according to the US Geological Survey.
The victims in East Java's Sumenep district were killed after being crushed by collapsed buildings, national disaster agency spokesman Sutopo Purwo Nugroho said.
"The quake didn't trigger any tsunami for sure", Dwikorita Karnawati told AFP.
The strong quake's epicentre was in the Bali Sea around 40 kilometres off the eastern end of Java island, according to the USGS, and was felt in Denpasar on the holiday island of Bali.
A separate quake hit about 200km south-west of the Papua New Guinea town of Rabaul at a depth of nearly 40km at 7am local time.
A Pacific-wide tsunami is not expected and there is no tsunami threat to Hawaii, the Pacific Tsunami Warning Center said in a bulletin.
Constable Roy Michael said by phone from Rabaul police station: 'We felt the quake a bit, but it was not too strong'. Australia's Tsunami Warning Center said its coastlines were not at risk.
"Wow, that was really strong and it lasted a long time", said a woman named Davy who took refuge in the parking lot of a Bali hotel.
Some guests at the hotel in Nusa Dua, south of Bali's main global airport fled outside after the strong tremor shook the building. "I immediately woke up and took my little kids out of the house", mother-of-two Ni Komang Sudiani said. "All my neighbours were also running".
The quake was also felt in Surabaya, the capital of East Java province, which is about 200km from Situbondo, the nearest town to the quake epicentre. Tonny Akbar Mahendro said: "I felt it for about 10 seconds".
The country was still reeling from an quake and tsunami last month that killed more than 2000 people.
Indonesia's disaster agency says the September 28 disaster that hit Sulawesi island has killed 2045 people.
The International Monetary Fund and its sister lending organisation, the World Bank, are holding annual meetings on Bali through to Sunday.