There are two powers vying for control of Somalia : Islamic clerics whose forces recently outgunned American-backed warlords for control of Mogadishu , the ruined capital , and a shaky transitional government , aided by the United Nations but with so little power that it can not survive in Mogadishu and is instead based in Baidoa , a midsize city about 150 miles away .