Indonesian police stormed a prison on the resort island of Bali Wednesday to regain control after inmates took over and set part of it on fire in a riot during which at least two prisoners were shot and wounded, officials said.

Australia's Foreign Ministry earlier said it was urgently checking on the welfare of 12 Australian prisoners held in the Kerobokan jail but Indonesian police said none of about 60 foreign prisoners were among the casualties.

The prison, about 10 km (six miles) north of the world-famous Kuta beach, is home to 1,200 inmates. The Australian prisoners include convicted drug traffickers Schappelle Corby and the so-called Bali Nine.

Fighting broke out late Tuesday when inmates attacked a guard post near the entrance, forcing officers to flee. Police said they shot two prisoners in the legs when they confronted a mob wielding sticks and throwing bricks.

Hundreds of armed police and army personnel stormed the prison at around 7 a.m. (midnight Tuesday GMT). Steady gunfire could be heard for 15 minutes coming from inside the prison, according to a Reuters witness.

Police later said they fired only warning shots and regained control about an hour later.

However, several inmates could still be seen at a guard tower in a different part of the prison near the main road about an hour after police said they had retaken control. Long live Kerobokan's inmates, the prisoners shouted.

National police spokesman Saud Usman Nasution told Reuters: We are trying to make the inmates go back into their blocks.

Authorities shut down electricity to reduce movement inside the prison and sealed off surrounding streets as water cannon, police trucks and Red Cross vehicles crowded an area normally full of handicraft sellers.

A burnt-out guard block smouldered in the early dawn and armed police patrolled perimeter fences looking down into the prison, Reuters Television footage showed.

Police also displayed what they said were rifles prisoners had snatched from wardens during the riot but which were recaptured later.

Conflict at the prison first started about a week ago when two inmates had a knife-fight, leading to a split in the wider prison population that developed into a bigger fight between two rival groups, Nasution said.

(Reporting by Zul Eduardo and Wayan Sukarda in DENPASAR and Olivia Rondonuwu in JAKARTA; Writing by Matthew Bigg; Editing by Paul Tait)