31 May 1989, Ter-Petrosyan was imprisoned in Moscow's Matrosskaya Tishina prison together with other members of the Karabakh Committee; they returned to Yerevan after their release and continued their activities. In 1989, Ter-Petrosyan and the other members of the Karabakh Committee founded a political party called the Pan-Armenian National Movement (ANM, also known by its Armenian acronym HHSh). Later on, Ter-Petrosyan became the party's chairman. On 27 August 1989, he was elected as a deputy of the Supreme Soviet of the Armenian SSR, and reelected on 20 May 1990. In elections in May 1990, the Pan-Armenian National Movement won a majority of seats in the Supreme Soviet of Armenia, becoming the first non-communist party to take power in a Soviet republic. On 4 August of the same year, Ter-Petrosyan was elected Chairman of the Supreme Council of Armenia, becoming the de facto leader of Armenia. As clashes between newly formed Armenian militias and Soviet forces intensified in mid-1990, Ter-Petrosyan was pressured by Soviet leader Mikhail Gorbachev to disarm the militias. Ter-Petrosyan complied, but the militias continued their activities in Nagorno-Karabakh. On 23 August 1990, Armenia formally declared its intention to become an independent state with Nagorno-Karabakh as an integral part. On 12 September 1990, Ter-Petrosyan met with Gorbachev, Azerbaijani leader Ayaz Mutalibov and other Soviet officials, where Gorbachev rejected Ter-Petrosyan's demands to withdraw the Soviet Army from Armenian settlements and create a line of demarcation between Armenians and Azebaijanis in Nagorno-Karabakh. Although Ter-Petrosyan initially expressed his willingness to include Armenia in a new union of sovereign states to replace the USSR, he found Mikhail Gorbachev's proposal for a new union treaty unacceptable. Armenia was one of six Soviet republics not to participate in the referendum on the new union held in March 1991. As Armenia moved toward independence, further clashes occurred both within Armenia and on the border with Azerbaijan in May 1991, and Soviet troops undertook an operation to deport Armenian villagers from parts of Azerbaijan. Ter-Petrosyan publicly stated on 6 May 1991 that "To all intents and purposes, the Soviet Union has declared war on Armenia." Ter-Petrosyan opposed the coup attempt against Gorbachev in August 1991. He attended unsuccessful negotiations with Ayaz Mutalibov mediated by Boris Yeltsin and Nursultan Nazarbayev in late September. On 20 September 1991, Armenians voted overwhelmingly in favor of independence, and the country officially declared independence three days later. Presidency: 1991–1998 First term Ter-Petrosyan