(CNN) -- A Somali militant group publicly executed two teenage girls Wednesday after accusing them of being spies for the Somali government, according to the group, eyewitnesses and a relative of one of the girls.

"Those two girls were evil and they were spies for the enemy (the Somali government), but the mujahedeen caught them and after investigation, they admitted their crime, so they have been executed," said Sheikh Yusuf Ali Ugas, commander of Al-Shabaab in Beledweyne, a town in central Somalia.

The teens were blindfolded with their hands behind their backs against a tree, and shot, according to a local journalist.

A resident of Beledweyne told CNN that Al-Shabaab called on the town's residents to come out and watch the execution.

"Hundreds of people came out to watch the execution," he said. "It was very bad ... the girls looked shocked and were crying but [no one] could help."

A relative of one of the teens denied they were spies.

"My cousin, Ayan Mohamed Jama, was just 16 years old and she was absolutely innocent," said the relative, who did not want their name used out of fear of retribution from Al-Shabaab. "And Al-Shabaab caught her and the other girl between El-gal and Beledweyne and simply accused them of what they were not."

The other girl, said the relative, was 15. Al-Shabaab refused their families' request to see the teens while they were in detention, "and they executed them at a public gathering, so this is inhumane and cruelty."

The El-gal area has been the scene of heavy fighting recently between Somali government forces and Al-Shabaab.

"Ayan didn't have any contact with the government and even in her life, she never had a mobile [phone] so we can't understand how she could be accused of being a spy," the relative said.

Last year, Al-Shabaab stoned a teenage girl to death in Kismayo, a town in southern Somalia.

Al-Shabaab is waging a war against Somalia's government in an effort to impose a stricter form of Islamic law, or sharia.

Somalia has not had a stable government since 1991, and fighting between the rebels and government troops has escalated the humanitarian crisis in the famine-ravaged country.