At least three Somali civilians died in the al-Shabaab attach on a UN compound in Mogadishu, medics said Thursday, bringing the confirmed death toll to 18. At least four foreigners - including two South African contractors - were killed in the attack on Wednesday, along with four Somali nationals employed at the UN, dpa reported. Seven al-Shabaab fighters were killed as African Union and Somali government troops retook the UN building in an hour-long firefight. Three civilians died in the heavy exchanges of gunfire, and 18 others were being treated in hospital for their injuries, according to medical sources. The death toll could rise further. The attack on the compound was condemned by the UN Security Council and the Somali government.