A Somali soldier has been beheaded by fighters loyal to al-Shabaab, the armed wing of the ousted Islamic courts.
Government soldiers were warned last week
Two other soldiers were killed in the ambush that took place on a major road leading from the capital, Mogadishu, to the government stronghold of Baidoa.
The attack comes a week after al-Shabaab threatened to start beheading soldiers manning checkpoints.
Ethiopian troops backing the government ousted the Union of Islamic Courts from Mogadishu in December 2006.
Al-Shabaab claimed responsibility for the attack on its website called Almujaahid.
An eyewitness who saw the beheading told the BBC about the attack.
"Islamic fighters armed with machine-guns and rocket-propelled grenades raided the checkpoint early in the morning and exchanged heavy gun fire, the men were outnumbered. Three of them were killed and the rest escaped," truck-driver Aden Boor Omar said.
Last week, the group issued a warning on Almujaahid threatened to launch raids on checkpoints and behead those operating them.
"We warned them and repeat our warning: 'Leave the checkpoints because they are in front of the holy fighters before they face the Ethiopians and harass civilians travelling on the roads," Sheikh Muqtar Robow Abu-Mansur, spokesman for the group, told local radio stations.
"I swear in the name of Allah we will slaughter them if they ignore our warning."
"Our fighters killed three of the Ethiopian stooges in response to their denial of our warning and we will continue to target others if they insist on to stay," he said.
Meanwhile, the United Nations special envoy for Somalia Ahmedou Ould Abdallah has said he has organised peace talks between the Somali government and the Islamist opposition.
On Wednesday, the government said for the first time it would negotiate with insurgency groups under international mediation.