Col. Ahmed Mohamed says the firefight occurred when the AU troops tried to force their way through a security checkpoint manned by Somali soldiers.
He says the confrontation occurred in the capital, Mogadishu, after two deadly explosions rocked the city on Friday evening.
Uganda's military spokesman Brig. Richard Karemire confirms that peacekeepers from Uganda shot at Somali soldiers in retaliation after the Somalis fired at them.
He says he is not aware of any fatalities.
Uganda has a sizeable contingent of peacekeepers in the Horn of Africa nation who are helping to protect the weak federal government from Islamic extremist group al-Shabab.
Al-Shabab has claimed responsibility for the latest bombings.