A roadside explosion outside the central Somalian town of Dhusamareb has killed 12 agents from the National Intelligence and Security Agency, police said in a statement.
Politicians were meeting in Dhusamareb to discuss the 8 February elections.
The al Shabaab militant group has claimed responsibility for the attack, according to reports.
Somalia has been engulfed in violence since the eruption of a civil war between clan-based armed groups in the early 1990s. The situation has been further complicated by Al-Shabaab militants, who are staging numerous attacks across the country in an attempt to impose a radical version of Sharia law in the country.