Thousands of Indonesians were evacuated from the slopes of a volcano on Sunday after it erupted for the first time in more than 400 years, spewing lava and sending smoke and dust 1,500 metres into the air.

Mount Sinabung, in the north of the island of Sumatra, began erupting around after rumbling for several days, prompting some villagers to panic before the mass evacuation got under way.

Indonesia is on the so-called Pacific ring of fire, an arc of volcanoes and geological fault lines triggering frequent earthquakes. The eruption triggered the highest red volcano alert.

Two people died, one from breathing problems and the other from a heart attack, and two suffered injuries in road accidents as trucks, ambulances and buses were mobilised in the rescue operation.

"This is the first time since 1600 that Sinabung has erupted and we have little knowledge in terms of its eruptive patterns," said Surono, head of Indonesia's vulcanology centre.

Authorities took at least 12,000 people from high-risk areas on the slopes of the 2,460-metre volcano to temporary shelters.

Local TV showed women and children wearing face masks in cramped tents.

The area around the volcano is largely agricultural.

"Since this is the first eruption we've had in Sinabung, we're anticipating residents to remain at the shelters for at least a week while waiting for further status alerts," said Priyadi Kardono, a spokesman at the national disaster management agency.

Residents panicked when the volcano started erupting and some of them who live in safer areas chose to take refugee at shelters, Mr Kardono added.

The eruption has not damaged roads or bridges. The nearest large city is Medan, where there were no disruptions to flights.

- Reuters