After his predecessor Levon Ter-Petrosyan was ousted as President, Kocharyan was elected Armenia's second President on 30 March 1998, defeating his main rival, Karen Demirchyan (who was a former leader of Soviet Armenia), in an early presidential election marred by irregularities and violations by both sides as reported by international electoral observers. There were also complaints that Kocharyan was not eligible to run under the Armenian constitution, which required candidates to be an Armenian citizen and have resided in Armenia for ten years. Before he became prime minister, Kocharyan resided in and was considered a citizen of the Nagorno-Karabakh Republic. Kocharyan was supported by Vazgen Sargsyan's Republican Party, as well as the banned Armenian Revolutionary Federation, which he relegalized early in his presidency.