Islamist groups often punish people in public - these men are being flogged
Islamist militants in Somalia have executed two people they accused of spying for foreign organisations.
Hundreds watched as a firing squad arranged by the al-Shabab group shot the pair in the capital, Mogadishu.
Al-Shabab officials said the men had been found guilty of working for the US CIA and African Union peacekeepers.
Analysts say the killings may have been in retaliation for a US raid earlier this month, in which an al-Qaeda suspect is said to have been killed.
The BBC's Mohammed Olad Hassan in Mogadishu says al-Shabab has carried out amputations and lashings in the past, but this is their first public execution in the city.
He says the death sentence was announced and the men were shot almost immediately by 10 masked men.
He says an al-Shabab official told reporters before the execution that the men had admitted spying - one for the AU, the other for the CIA.
The US regards al-Shabab as a proxy for al-Qaeda in Somalia, and says the group threatens to destabilise the region.
Two weeks ago, US forces launched an attack from helicopters in southern Somalia, reportedly killing Kenyan-born Saleh Ali Saleh Nabhan who was wanted by the US for attacks in Kenya.
It was the first such US incursion into Somalia for years.
Days after the raid, suicide bombers attacked an AU base in Mogadishu and killed at least 16 people.
Al-Shabab claimed responsibility, saying the attack was in revenge for the US raid.
Several radical Islamist groups are vying for control of the country - and hold power in much of central and southern Somalia, including parts of the capital city.
Al-Shabab is among the groups attempting to impose an extreme brand of Islamic law on the areas it controls.
The rebel fighters are battling troops loyal to the government - which controls little territory but is backed by the US, UN and peacekeepers from the AU.
The country has been wracked by conflict since 1991, when it last had an effective national government.
Some three million people - half the population - need food aid, while hundreds of thousands of people have fled the country.