Students scrambled to safety as sirens blared during a tsunami drill on the Indonesian resort island of Bali on Tuesday, part of a campaign to prepare for disasters in the quake-prone country.

Students at the Tanjung Benoa 2 elementary school took cover under their desks when the quake drill began, and then followed a tsunami evacuation route to the roof of a nearby hotel.

The exercise was part of a joint project by the United Nations Development Programme (UNDP) and Japan's government to raise awareness among children in 18 Asia-Pacific nations.

"Indonesia and Japan have the same high risk of natural disasters like earthquakes and tsunami ... so it's very reasonable that Indonesia is given priority in this project," said Hirohisa Chiba, Japan's consul general to Indonesia.

Indonesia was the country worst-hit in 2004 by an Indian Ocean tsunami triggered by a 9.1 magnitude earthquake. The province of Aceh on the northwest tip of Sumatra island bore the brunt of tsunami, with at least 168,000 killed.

Huge tsunami slammed into Japan's northeast coast in 2011, killing about 18,000 people and prompting authorities to revise warning systems and evacuation plans to save more lives.