Footage of an imam reciting evening prayers in Bali while a deadly earthquake struck the neighbouring island of Lombok has gone viral, with people praising him for his unwavering faith.

The video, recorded on a smartphone, shows him supporting himself against the wall as the room shakes violently and some worshipers flee.

The powerful quake has killed scores of people and damaged thousands of buildings on Lombok.