Image copyright Getty Images Image caption The green-domed mosque in North Lombok has now been reduced to rubble

Rescue workers are searching the ruins of a mosque in Lombok, Indonesia, where it is feared people were trapped by Sunday's deadly earthquake.

The 6.9 magnitude quake is now known to have killed nearly 100 people and left at least 20,000 people homeless.

The mosque is one of thousands of buildings in North Lombok that were damaged.

Two people have already been rescued from the rubble, according to the national search and rescue agency.

The earthquake struck on Sunday amid evening prayers. One witness told news agency AFP there may have been as many as 50 people in Jabal Nur mosque in Lading-Lading village at the time.

"Our imam ran, so the others followed," 53-year-old Kelana said.

At least three crushed bodies have already been retrieved from the rubble.

Disaster agency spokesman Sutopo Purwo Nugroho said many sandals were found in front of the mosque, raising fears that more victims could be found.

Media playback is unsupported on your device Media caption Imam stays as quake hits Bali mosque

He shared footage of one man being brought out from under the collapsed building.

Lombok is a roughly 4,500 sq km (1,700 sq miles) island east of the slightly larger island of Bali.

The impact of Sunday's quake has far exceeded that of another which hit Lombok last week, killing 16 people.

The official death toll now stands at 98, but officials believe that may rise. Most of the victims were killed by falling debris.

Image copyright Getty Images Image caption Rescuers look under the ruins of the flattened mosque

Aid agencies have said their priority now is to provide shelter for displaced people, as aftershocks continue to rattle the area.

In Lombok's main city of Mataram, medical staff have been struggling to cope with the injured in damaged hospitals. They have resorted to treating people in the open air.

But the Indonesian Red Cross said there had been one "blessing" amid the disaster. Its volunteers helped a 38-year-old woman give birth at a temporary health station on Monday. One of the names she gave her baby was "Gempa", which means earthquake in Indonesian.

Image copyright Getty Images Image caption Pictures showed hospital patients in Mataram being moved out to makeshift wards set up under tents

Phillipa Hodge was at the Katamaran Hotel just north of Mataram when the quake hit. She told the BBC the lights went out and the scene "became chaotic".

"People were falling over each other trying to get out, and glass was shattering. We felt debris fall on to us.

"I couldn't see my partner and I was shouting his name. Finally we found each other and he had blood all over his face and shirt."

'They are panicking'

Buildings in Bali were also left damaged by the earthquake and at least two people are known to have died there.

Meanwhile search and rescue teams have rescued at least 4,000 people from the three Gili Islands. The white sand beaches and clear waters draw many backpackers and divers.

Videos and images from the Gilis show hundreds of tourists crowded on beaches waiting to board small boats.

Image copyright Baiq Dian Image caption On Gili Air, one of three islands that make up the Gili islands, crowds of tourists had waited to be evacuated

"It's understandable they want to leave the Gilis, they are panicking," Muhammad Faozal, the head of the tourism agency in West Nusa Tenggara province had earlier told AFP.

Indonesia's President Joko Widodo has urged the speedy evacuation of casualties, calling for more flights to be sent to the affected areas.

The earthquake on Sunday was of magnitude 6.9, according to the US Geological Survey.

It struck at 19:46 local time (11:46 GMT) at a fairly shallow depth of 31km (19 miles).

Indonesia is prone to earthquakes because it lies on the Ring of Fire - the line of frequent quakes and volcanic eruptions that circles virtually the entire Pacific rim.

More than half of the world's active volcanoes above sea level are part of the ring.