Following the September 11 attacks, the United States and several allies invaded Afghanistan, overthrowing the Taliban's first government in support of the opposition Northern Alliance. After the invasion, a transitional government was formed under the leadership of Hamid Karzai.  After the 2003 loya jirga, an Islamic republic was proclaimed under a new constitution, and Karzai was elected for a full term as president. Meanwhile, the US-led international coalition helped maintain internal security, gradually transferring the burden of defense to the Afghan Armed Forces after 2013–14.