A view of damage houses at Gumantar village after an earlier earthquake with a magnitude of 6.9 hit Lombok in Indonesia on August 08, 2018.

The Indonesian island of Lombok was shaken by a third big earthquake in little more than a week Thursday as the official death toll from an earlier quake topped 300.

The strong aftershock, measured at magnitude 5.9 by the U.S. Geological Survey, caused panic, damage to buildings, landslides and injuries. It was centered in the northwest of the island and didn't have the potential to cause a tsunami, Indonesia's geological agency said.

Videos showed rubble strewn across streets and clouds of dust enveloping buildings. In northern Lombok, some people leaped from their vehicles on a traffic jammed road while an elderly woman standing in the back of a pickup truck wailed "God is Great." An Associated Press reporter in the provincial capital Mataram saw people injured by the tremor and a hospital moved patients outside.

The aftershock had caused more "trauma," said national disaster agency spokesman Sutopo Purwo Nugroho.

Wiranto, Indonesia's top security minister, told reporters the death toll from Sunday's magnitude 7.0 quake had risen to 319. The announcement came after an inter-agency meeting was called to resolve wildly different figures from different agencies.

Grieving relatives were burying their dead and medics tended to people whose broken limbs hadn't yet been treated in the day since the quake. The Red Cross said it was focusing relief efforts on an estimated 20,000 people yet to get any assistance.

In Kopang Daya village in the hard-hit Tanjung district of north Lombok, a distraught family was burying their 13-year-old daughter who was struck by a collapsing wall and then trampled when the quake Sunday caused a stampede at her Islamic boarding school.

Villagers and relatives prayed outside a tent where the girl's body lay inside covered in a white cloth.

"She was praying when the earthquake happened," said her uncle Tarna, who gave a single name. "She was trying to get out, but she got hit by a wall and fell down. Children were running out from the building in panic and she was stepped on by her friends," he said.

Thousands of homes were damaged or destroyed in Sunday's quake and more than 150,000 people are homeless. The earlier earthquakes also left cracks in walls and roofs, making the weakened buildings susceptible to collapse.

"People are always saying they need water and tarps," said Indonesian Red Cross spokesman Arifin Hadi. He said the agency has sent 20 water trucks to five remote areas, including one village of about 1,200 households.

He also said they're continuing to look for people with untreated injuries.

In Kopang Daya, injured villagers got their first proper treatment Thursday after medics arrived with a portable X-ray and other supplies. They tended to an elderly woman with an injured face and hips who'd been knocked over by her grandson as they scrambled from their house.

"Her son managed to get out from the house when the earthquake hit but the grandmother and grandson were left behind," said a relative Nani Wijayanti. "The grandson tried to help the grandmother to get out but he pushed too hard," she said.

A July 29 quake on Lombok killed 16 people.

Indonesia is prone to earthquakes because of its location on the "Ring of Fire," an arc of volcanoes and fault lines in the Pacific Basin. In December 2004, a massive magnitude 9.1 earthquake off Sumatra triggered a tsunami that killed 230,000 people in a dozen countries.