Mogadishu: Sitting on a mat at home between taking orders for arms on his two mobile phones, Othman Bare gives thanks for the riches flowing from Somalia's war.

"I have only been in the weapon business [for] five years, but I have erected three villas. I have also opened shops for my two wives," the 40-year-old, one of about 400 Somali men operating in Mogadishu's main weapons market, said.

"Peace means bankruptcy for us."

Despite a UN arms embargo on Somalia, the Horn of Africa nation is awash with weaponry from all over the world that has fuelled one of Africa's longest-running conflicts.

In the latest cycle of civil war, militants have been fighting the Somali government for the last two years and 18,000 civilians have been killed in the crossfire.

Weapons are captured, sold, and recycled constantly between both sides, experts say. Many arms have come from Ethiopian soldiers who intervened in Somalia between 2006 and early 2009.

African Union peacekeepers have been accused of trafficking arms, and regional bodies say Eritrea - among others - is funnelling weapons towards the rebels.

Weapons are also said to pour across the porous borders of Kenya, Djibouti, and Ethiopia, arriving by plane and through seas infested by pirates who are themselves armed to the teeth.

The Mogadishu arms market is just one part of an illicit global arms bazaar.

According to Geneva-based research body Small Arms Survey, there are at least 640 million firearms in the world, one for every 10 people on the planet.

Only a third of these are in the hands of armies or law enforcement agencies, the rest dispersed among non-state militia groups or the general population.

Dealers like Bare say the main Irtogte market, within the sprawling Bakara commercial area of Mogadishu, is holding its largest stock ever, and gunrunners are rolling in money.

The risks of being robbed, cheated or shot are high, however, and prices fluctuate greatly. They are at a low right now due to the abundance of supply.

"The good thing is that our goods are not perishable," Bare said. "We get a lot of cash, but we are always in terror."

Dealers say they can be arrested, or even beheaded by the Islamists, if caught outside the market.

"But inside our market, we are cocks. There are hundreds of retailers and wholesalers and each has four well-armed guards."

He said masked Islamists once picked him up, blindfolded him and took him to a well-known execution house when he was found carrying a US M16 rifle ordered by a pirate. As he was being beaten by gun-butt, a friend with good contacts in the Al Shabaab insurgent movement came and rescued him.

"The government is better than Islamists - they do not kill people. They take your property and jail you only for few days," Bare said.

While Islamists come to the market for purchases, traders said, arms are delivered to government and other buyers.

"We dismantle weapons and then secretly take them to anyone who needs to buy."

With the exception of pistols from Yemen, North Korean AK-47s, and hand-grenades from government supplies, most arms are second-hand, the dealers said.

One of the cheapest items is an Indian AK-47, at $140 (Dh515) each, but fighters disparage its poor quality compared to the heat-resistant North Korean version at $600, and the light Russian one at $400. At the top of the range of light weapons, the most expensive pistol, Russian-made, goes for $1,000.

Hand-grenades go for $25 each, landmines $100.

There is no shortage of sources for such weapons.

According to a 2006 US Congressional report, about 70 nations produce small arms and light weapons.

Most weapons are legally manufactured in relatively large factories, but many are diverted from their intended destination using false paperwork, according to weapons trade monitors.

In Mogadishu, the arms-dealers are not the only ones benefiting from war.

At $15 for each grave he digs, cemetery worker Ali Osman is in the money every time the death toll goes up.

"Sometimes I dig around 20 graves and stay here until evening," Othman said, while burying a baby.

Somali bankers say the more the fighting, the more cash that arrives by wire transfers.