The fighting threatened to push Somalia closer to the brink of an all-out war between the Islamist forces that rule Mogadishu , the seaside capital , and the weak , so-called transitional government based in the inland city of Baidoa .