Following the dissolution of the Soviet Union and the end of the First Nagorno-Karabakh War, the right-wing Republican Party of Armenia began to consolidate power as the country's ruling political party. When the republican-supported Robert Kocharyan was elected as President of Armenia, he legalized the formerly banned Armenian Revolutionary Federation, which went on to form a coalition government with the republicans following the 1999 parliamentary election. On October 27, 1999, the Armenian parliament shooting took place, in which the prime minister Vazgen Sargsyan and the speaker Karen Demirchyan were both killed in a terrorist attack led by the former ARF member Nairi Hunanyan. This event led to a rise authoritarian rule by Kocharyan and the republican party.