The Gambia gained independence as a constitutional monarchy that remained part of the Commonwealth, but in 1970 became a presidential republic. Jawara was elected the first President and remained in this position until 1994. A coup, led by Kukoi Sanyang, was attempted in 1981 but failed after Senegalese intervention. From 1981 to 1989, the Gambia entered into the Senegambia Confederation, which collapsed. In 1994, Jawara was overthrown in a coup d'état led by Yahya Jammeh, who ruled as a military dictator for two years through the AFPRC. He was elected President in 1996 and continued in this role until 2017. During this time, Jammeh's party, the APRC, dominated Gambian politics. the Gambia left the Commonwealth of Nations in 2013 and suffered an unsuccessful coup attempt in 2014. In the 2016 election, Adama Barrow was elected President, backed by a coalition of opposition parties. Jammeh's refusal to step down led to a constitutional crisis and the intervention of ECOWAS forces.