The deaths happened on Saturday near the capital Mogadishu when members of the Hizbul Islam group stormed a house where people were watching Nigeria play Argentina.
A further 10 people were arrested by the group, which has imposed a strict version of Islam in the areas they control in southern and central Somalia.
The following night, another 30 people including a 15-year-old boy were arrested as the watched the Germany-Australia game in two private homes in the town of Afgoye.
A spokesman for the group, Sheikh Mohamed Abdi Aros, said the rest of Somalia should respect their ban on the World Cup – the first to be hosted in Africa – and focus instead on “pursuing holy jihad”.
“We are warning all the youth of Somalia not to dare watch these World Cup matches. It is a waste of money and time and they will not benefit anything or get any experience by watching mad men jumping up and down,” he said.
The ban, which has seen radio stations around the city taken off air for playing music, has resulted in people flocking to public cinemas in the few Government-controlled areas of the country.
Ahmed Santos used to live in an area of Somalia run by militants, but now is in a government-controlled area.
“I can now freely watch the matches,” he said. “I am so sorry that some of my friends who are now living where I was once don’t have that chance to watch the World Cup. I really feel sorry for them.”
Others are risking the wrath of the militants, such is their love of the beautiful game.
One man, who lives in the militant-controlled livestock market area of the city said he watched Algeria-Slovenia at home with his family.
“I have one eye on the TV and the other on the door, and the sound turned down,” he said