The accident took place early on Sunday when the fire gutted the Buddhist Avalo Kitesvara shrine in North Sumatra's Pematang Siantar district, the state-run Antara news agency reported.
Commissioner Shafwan Khayat, chief of the Siantar's district police was quoted as saying that the fire broke out at about 1 am Sunday in a prayer hall on the shrine's second floor.
The raging flames immediately spread to adjoining rooms on the same floor, and eventually reached the third floor, Khayat was quoted as saying.
Seven people were burned to death while seven others sustained serious burns or broken bones after they jumped from the second floor, Khayat said.
A number of people had been questioned as part of the police's investigation before determining the cause of the blaze.