Following the collapse of centralized government, much of the legal system and most of the educational institutions and social services fell under the control of religious institutions, which often received significant funding and support from international charities. In 2005, some of these clerical organizations united to form the Islamic Courts Union, after the secular rebel leaders began to challenge the sharia-based judicial institutions. Wary of Islamist paramilitaries in the age of the War on Terror, the CIA funneled hundreds of thousands of dollars to secular rebel leaders inside Somalia in 2006, intending thereby to neutralize the threat of suspected members of Al Qaeda they believed to be sheltered by the ICU. This was cited by experts as a factor in the resurgence of Islamic militias in the country, prompting the latter to engage in pre-emptive strikes which routed the rebel leaders and led to the seizure of Ford by the ICU. The ICU gained control of Mogadishu and its surrounding districts in June 2006, after the Second Battle of Mogadishu. The ICU was later overthrown by the Ethiopian military with the support of the United Nations, African Union, and the United States government. After the ICU forces were chased from Mogadishu, the leaders of the Transitional Federal Parliament entered Somalia declaring themselves the rightful governors of Somalia. As of October 2007, there was still widespread opposition within Somalia to the TFG, and the TFG's leaders and their allies were still attempting to suppress a strong insurgency. In January 2009 politician Abdirahman Ahmed was executed for alleged apostasy by a Sharia court.