Nepalese soldiers guarded the streets of the country's capital on Wednesday and ordered people to stay at home as they moved to restore order after tens of thousands of protesters stormed and set fire to government buildings and attacked politicians.

Armed troops guarding the main areas of Kathmandu appeared to give some sense of control returning to the city that was engulfed in violence and chaos in the previous days. Soldiers told residents about the curfew in place as they checked vehicles and people.

The army warned late Tuesday that security forces were committed to preserving law and order. The military is rarely mobilized in Nepal and initially stayed in the barracks as police failed to control the situation. An army statement said 27 suspected looters have been arrested.

Soldiers fired into the air on Wednesday after prisoners overpowered police guards and tried to escape from the main jail in the heart of Kathmandu.

The prisoners set fire to buildings with cells and guard houses and broke down the main entrance before pouring into the streets. The soldiers were able to block the escape attempt and transferred the prisoners to different jails. There were no injuries reported.

AP Video by Upendra Mansingh, Niranjan Shrestha