Another 700 people were injured, according to BNPB chief Major General Suharyanto.
According to the United States Geological Survey (USGS), the earthquake struck at a depth of 10 kilometers (6.2 miles) in the Siangjur region of West Java province.
According to the BNPB local office in Cianjur area, four schools and 52 houses collapsed or were badly damaged. A mosque and a hospital were also damaged, the office said.
BNPB said there was no tsunami risk, Reuters reported.
Herman Suharman, a government official in Cianjur, told media that some residents were trapped in the rubble of the collapsed buildings. News channel Metro TV showed hundreds of victims being treated in the hospital parking lot.
It said an Islamic boarding school was also damaged and communications were disrupted due to power cuts.
According to Reuters, television footage showed residents outside the buildings almost completely collapsed.
A man, named only as Machlis, said he felt “a huge tremor” and that the walls and ceiling of his office were damaged.
“I was very shocked. I was worried that there would be another earthquake,” Machlis told Metro TV.
As 25 aftershocks were reported in the two hours after the quake, the BMKG warned of a risk of landslides, especially in case of heavy rain.
Indonesia sits on the “Ring of Fire” surrounding the Pacific Ocean, causing frequent earthquakes and volcanic activity. One of the most seismically active zones on the planet, it stretches from Japan and Indonesia to California and South America on one side of the Pacific.
In 2004, a 9.1-magnitude earthquake off the northern Indonesian island of Sumatra triggered a tsunami that hit 14 countries, killing 226,000 people along the Indian Ocean coast, more than half of them in Indonesia.
“Friend of animals everywhere. Coffee maven. Professional food trailblazer. Twitter buff.”