After months of fierce fighting , Islamic militias declared Monday that they had taken control of Somalia 's capital , Mogadishu , defeating the warlords widely believed to be backed by the United States and raising questions about whether the country would head down an extremist path .