Games consoles are all the rage in Mogadishu, keeping boys away from school but also away from the militants

Inside a hot, cramped room in the Somali capital, 10 sweating children sat on wooden desks, not unlike those found in schools. These boys, though, were not in class. They were staring at a small TV and tightly gripping video game controllers.

A year after al-Shabaab lost control of Mogadishu, video games are now all the rage. Under the militant group recreational pleasures such as films and Nintendo were banned.

Today, Somali boys are bingeing on PlayStation and other games consoles, a development seen has having both positive and negative aspects.

Some parents say the games are helping to keep the young off the street, which in turn lowers the chances they might be recruited by al-Shabaab. But many teenage boys admit to skipping school to practice their gaming skills.

"I spend half of my day here. The video games are fascinating," said Abdirizak Muse, a 16-year-old who dropped out of his Mogadishu school in early 2011 after al-Shabaab militants dug trenches around it.

Among the positive changes since African Union (AU) and Somali troops drove the militants out of Mogadishu are new restaurants, a vibrant beach front, the reopening of the national theatre and a video game shop.

Mohamed Deq Abdullahi, a father of two teenage boys, watched his sons play a football video game in a sweltering shop on a recent sunny day. He sees their new hobby as a beneficial development.

"This is his day-long activity because I don't want him get bored and go to war," Abdullahi said. "The busier they stay the more tired they get and the more they ignore violence."

During the Islamist uprising in 2006 that gave way to the al-Shabaab militia, schools were a prime source of recruitment for militants seeking to bolster their ranks. Hundreds, if not thousands, of children were lured into combat.

While video game shops where teenage boys can pay a fee to play by the hour are popular, the minority of more affluent Somalis are buying game systems for home. Muse Haji, a father of six, bought a system for his children.

"For us it's a choice between the lesser evil and the bigger evil," he said. "Instead of my children going out and being radicalised and used as human bombs, it's better for me that they stay at homes and play games.

"We focus on non-violent games such as car racing, soccer and some educational games."

Haji said that like all children of this generation, his are fanatics about technology, a positive change from previous generations past when the young seemed more interested in firing weapons and joining war.

At a video game shop in the Wardhigley district of the capital, dozens of young people waited in line earlier this week to get a chance to play. The shop charges the equivalent of 10 cents (6p) for 15 minutes of play. The atmosphere is eerily quiet except for the beeping, whooshing and cheering emanating from the games.

"I have been here almost an hour to wait for my turn. I will play a game of soccer with my friend again," Shafici Osman, 14, said with an air of desperation as he watched his friends play. "I like coming here every day. I am either playing or watching others play. I am happy because my parents approve, and they give me money to play."

The sudden popularity of video games has created business opportunities. Arcade owner Ahmed Aden said he had seen his business grow quickly since opening seven months ago.

"We started with two screens and now we have eight. Our business is booming," he said.

A 2011 UN report said militants were systematically recruiting children across central and southern Somalia. Schools – both teachers and students – were consistently targeted by al-Shabaab recruiters, it said.

The report said some 50 schools closed in south-central Somalia because of growing demands from militia groups. Schools were destroyed and damaged during clashes between insurgents and government and AU troops.

Ali Abdi, a 15-year-old, said he was trained to fight with al-Shabaab, but after returning home for a visit his mother would not let him return to the militants. His brother opened an arcade, where Ali now happily spends his time. He plans to return to school when militants no longer recruit from classrooms.

"Many of my friends are unlucky and have taken part in the violence in the country. Some of them have died. Others are carrying guns around. In some ways, video games have saved my life," he said.