Nigerian soldiers on a revenge spree blocked roads, fired into the air and set five buses ablaze after one of their number was killed in a bus accident in the commercial capital Lagos.

Witnesses said a soldier illegally riding a motorbike had stopped in a bus lane in the Ikorodu district when he was knocked down and killed by a swerving bus.

Shortly after the incident, 10 soldiers arrived at the scene and began burning buses and firing sporadically in the air.

"Everybody started running away when they came in two of their vehicles because they knew it was trouble," said Moshood, a 26-year-old street trader who was hawking goods at the time.

He said the bus driver had run into a nearby housing estate, and soldiers beat up and dragged away two security guards who refused to let them in.

Around three dozen soldiers later cordoned off the scene and angrily attempted to prevent onlookers from filming.

Femi Oke-Osanyitolu, director general of the Lagos state emergency management agency, said: "The governor of the state is currently talking with the superior officers of the army to restore order within the area."

Rights groups say indiscipline is rife among Nigerian troops, particularly those in the north-east who are attempting to quell a Islamist insurgency. In May 2011, soldiers killed 10 policemen in an hours-long rampage after a policeman shot and killed one of their colleagues.

Some people expressed anger that officials continued to ride motorbikes, which have been banned on motorways since last year. The okada bikes are cited as a road hazard for weaving dangerously through traffic-choked streets, but remain a cheap means of transport.

"Laws should apply from the head to the bottom. It's only policemen who are still using okadas we have been deprived of, and secondly burning the bus isn't going to bring a dead person back. It just means even less transport for us ordinary people," said Alex Chukwu, a 55-year-old insurance broker, at the scene of the charred buses.

One witness said the soldiers' actions were justified as buses were notorious for reckless driving. "I support what the soldiers did because the way the BRT [bus] drivers behave on the road is a menace to everybody," said Onazi Akwene.