the Azerbaijan Republic" and restored the flag of the Azerbaijan Democratic Republic as the state flag. As a consequence of the failed 1991 Soviet coup d'état attempt in Moscow, the Supreme Council of Azerbaijan adopted a Declaration of Independence on 18 October 1991, which was affirmed by a nationwide referendum in December 1991, while the Soviet Union officially ceased to exist on 26 December 1991. The country now celebrates its Independence Day on 18 October. The early years of independence were overshadowed by the First Nagorno-Karabakh war with the ethnic Armenian majority of Nagorno-Karabakh backed by Armenia. By the end of the hostilities in 1994, Armenians controlled up to 14–16 percent of Azerbaijani territory, including Nagorno-Karabakh itself. During the war many atrocities and pogroms by both sides were committed including the massacres at Malibeyli and Gushchular, the Garadaghly massacre and the Khojaly massacres, along with the Baku pogrom, the Maraga massacre and the Kirovabad pogrom. Furthermore, an estimated 30,000 people have been killed and more than a million people have been displaced, more than 800,000 Azerbaijanis and 300,000 Armenians. Four United Nations Security Council Resolutions (822, 853, 874, and 884) demand for "the immediate withdrawal of all Armenian forces from all occupied territories of Azerbaijan." Many Russians and Armenians left and fled Azerbaijan as refugees during the 1990s. According to the 1970 census, there were 510,000 ethnic Russians and 484,000 Armenians in Azerbaijan. Heydar Aliyev, 1993–today In 1993, democratically elected president Abulfaz Elchibey was overthrown by a military insurrection led by Colonel Surat Huseynov, which resulted in the rise to power of the former leader of Soviet Azerbaijan, Heydar Aliyev. In 1994, Surat Huseynov, by that time the prime minister, attempted another military coup against Heydar Aliyev, but he was arrested and charged with treason. A year later, in 1995, another coup was attempted against Aliyev, this time by the commander of the OMON special unit, Rovshan Javadov. The coup was averted, resulting in the killing of the latter and disbanding of Azerbaijan's OMON units. At the same time, the country was tainted by rampant corruption in the governing bureaucracy. In October 1998, Aliyev was reelected for a second term. Despite the much improved economy, particularly with the exploitation of the Azeri–Chirag–Guneshli oil field and Shah Deniz gas field, Aliyev's presidency was criticized due to suspected election fraud, high levels of economic inequality and domestic corruption. Ilham Aliyev, Heydar Aliyev's