The executions also come amid mounting public pressure on the authorities of Southwest State after reports of two other cases of rapes of young boys emerged, angering local residents who are demanding justice.
The two soldiers who were executed Tuesday had confessed to the crime, according to Southwestern provincial/regional information minister Ilyas Said Ali. The minister also confirmed the arrests of more people in connection with the other two rape cases.
Somalis on social media have urged authorities to bring perpetrators of the attacks to justice. Rape suspects often avoid prosecutions in this Horn of Africa nation, where the justice system remains weak.
Traditional elders often try to settle rape cases through talks among elders representing the perpetrator and the victim, but local activists subsequently urged the suspects to face trial under a tough new law against sex crimes.
Under the new law, those found guilty of rape can be jailed for up to 10 years without the option of a fine. However, some of them could face the death penalty. Somalia is trying to build a functional government after years of lawlessness and an insurgency by Islamic extremists.