Security officials say at least 27 people have died in intense clashes between pro-government forces in Somalia and al-Shabab militants .