Iranpress/Africa :The attack occurred in Afgoye district, located about 30 kilometers northwest of Mogadishu, on Sunday, according to Reuters.
Al-Shabab, however, has given a different account of the attack, saying 11 Somali soldiers have been killed.
The government has deployed forces to Afgoye to ensure security in the region ahead of a presidential visit.
Despite being ousted from large parts of the south and central Somalia, al-Shabab continues deadly attacks across the country, which has been plagued by war and poverty for decades.
The terrorist group aims to topple the Western-backed government in Mogadishu and drive out African Union peacekeeping troops. It has been engaged in militancy since 2006.
Read More:
Somalia's al Shabaab storms military base, kills 27 soldiers
Al Shabaab attacks Somalia police HQ
US soldier killed, 4 more wounded in Somalia attack