The two blasts took place near the African Union base, Somali police chief Gen. Mohamed Sheikh Hassan said at a press conference.
Somalia's Islamic extremist rebels, al-Shabab, claimed responsibility for the bombings, according to the group's Andalus radio station.
Al-Shabab is waging an insurgency against Somalia's weak U.N.-backed government with the goal of establishing an Islamic emirate in Somalia, ruled by a strict form of Islam.
Earlier this month, eight soldiers were killed when an al-Shabab suicide car bomber targeted a Somalia military training camp and attackers then entered the base on foot.
More than 22,000 troops and police serve in the African Union force, which also includes troops from Burundi, Djibouti, Kenya, Sierra Leone and Ethiopia.
Al-Shabab opposes the presence of foreign troops in Somalia and has launched attacks in countries that have contributed to the AU force.
Although al-Shabab was ousted from the Somali capital, Mogadishu, in 2011, it continues to wage a deadly guerrilla campaign that includes suicide bombings.