Russia on Friday launched an investigation after an army unit accidentally fired mortar shells into the grounds of a boarding school in the troubled North Caucasus region of Dagestan.

Russian television showed smashed windows at the school in the town of Buinaksk after the early-morning incident, in which none of the sleeping children was injured.

The country's military investigators acknowledged in a statement Friday that the shells were fired by a neighbouring military unit that was taking part in an "anti-terrorist" operation against militants.

"At 5:20 am (0150 GMT), while giving an order to the commander of the rocket mortar, the commanding officer of the platoon mistook the main direction of fire, which meant the direction of shooting changed by 800 metres," investigators said.

"As a result, three 120-millimetre mortar shells burst in the grounds of boarding school number 3 in Buinaksk."

The explosions led to "damage to a high-volt cable and to the windows of the building," investigators said.

The military unit was taking part in an operation to crack down on members of armed groups in the area, investigators said.

In 1999, an explosion outside an apartment block in Buinaksk killed more than 50 people. It was one of a series of attacks that led to Russian troops being sent into Chechnya for a second war.

In Russia, state boarding schools usually educate children from remote regions or from underprivileged backgrounds.