Image caption Eyewitnesses spoke of a shooting spree by soldiers

Nigerian troops have opened fire and burned buildings in the north-eastern city of Maiduguri, reportedly killing 30 civilians.

The shootings came after a bomb blast targeting the army had injured two soldiers.

But army spokesman Lt Col Sagir Musa told the BBC that soldiers had not shot any civilians.

Maiduguri has been under siege from the militant Islamist group Boko Haram, which wants Sharia law in Nigeria.

On Sunday, the army said it killed 30 Boko Haram members in another north-eastern city, Damaturu.

Eyewitnesses in Maiduguri said soldiers began to indiscriminately open fire on residents and set fire to homes and businesses.

'Truck full of bodies'

An Associated Press reporter in the city reportedly counted 30 bodies and 50 buildings that had been set ablaze.

Unnamed nurses at the local Umaru Shehu were quoted by Reuters news agency as saying that 30 bodies in civilian clothes had been brought in, with a further five corpses in military uniforms.

"Initially, soldiers that came after the explosion harassed residents, whipping them," one person told AFP news agency.

"But later they went on a shooting spree and started setting homes and shops on fire."

Another resident said the soldiers "shot everybody in sight".

One Maiduguri resident told the BBC that a tipper truck full of bodies had been driven to the hospital.

"The bodies were dumped there like bags of cement," said the resident.

Another resident said: "When soldiers are killed, everyone is an enemy. You just have to pray you are as far as possible from the scene."

Similar reports of the security forces arresting and killing local residents following militant attacks have been made on numerous occasions during the past three years of Boko Haram violence.

The BBC's Will Ross, in Lagos, says that in the conflict between the army and Boko Haram, civilians have paid a heavy price.

Not trusted by either side, people complain that they are stuck in the middle between the bombs of Boko Haram and the bullets of the army, our correspondent says.

Col Musa confirmed earlier on Monday that two soldiers had been injured in a bomb blast targeting an army patrol vehicle in Maiduguri.

Attacks in central and northern Nigeria blamed on Boko Haram have killed some 1,400 people since 2010.