It is the third big quake to hit Lombok in little over a week.
The footage of the prayer led by Imam Arafat at the Musholla As-Syuhada Mosque was being broadcast live on Facebook on Sunday night when a magnitude 7.0 quake hit the neighboring Lombok Island.
Officials said the quake's epicenter was on land and so there was no risk of a tsunami.
This most recent aftershock happened on Thursday and had a magnitude of 5.9.More news: New quake strikes Lombok island
The death toll from a devastating quake on the Indonesian island of Lombok jumped to 319 Thursday, as strong aftershocks triggered panic among traumatized survivors waiting for aid in the worst-hit regions.
"People in the street began to panic and got out of their cars, they ran in different directions in the middle of the traffic".
Facebook apologised after users posting about a deadly natural disaster in Indonesia on the social media platform saw their messages decorated with images of balloons and confetti.
BNPB's official death toll from Sunday's quake stood at 131 on Wednesday, although some Indonesian officials put the number at 347.
Authorities have said the death toll, 105 as of Tuesday evening, would increase as the search effort continues.More news: Google Pixel 3 XL live pictures and unboxing video emerge
The military said it sent five planes carrying food, medicine, blankets, field tents and water tankers.
Displaced residents living in shelters rushed out of their temporary homes, fearing more destruction to structures already weakened from the previous two quakes.
The Red Cross has said that incident, which killed at least 131 people, was "exceptionally destructive". Tens of thousands are now sleeping out in the open or in the ruins of their homes.
Lying on the fault lines in the Pacific Basin, Indonesia is a hotspot for earthquakes. An estimated 230,000 people died after a magnitude 9.1 natural disaster triggered a tsunami off the coast of Sumatra in December 2004.
Wiranto said the government will develop a plan to rebuild communities on Lombok, which like its more famous neighbour Bali is a popular tourist destination with powder-white beaches, mountains and a lush interior.More news: Sony Celebrates Huge Sales Milestone with Limited Edition PS4 Pro