If the men are convicted , it may offer the most concrete link of a growing Qaeda presence in Somalia , where the Islamic Courts Union , an Islamist group , has struggled to consolidate its position after taking control of Mogadishu , the country 's capital , in June .