Before the 19th century today's Azerbaijan was a part of territory ruled by Iranian rulers. During the early decades of the nineteenth century, Russia and Persia go to war over Azerbaijan, a major strategic point, and Russia's gateway to Iran and India. Iran was defeated and accepted the Treaty of Gulistan (October 13, 1813) as a result of which Iran ceded all its holdings to the north of the Aras River to Russia. Northern Azerbaijan was thus annexed to the Russian Empire. In 1828, Iran's attempt to recapture its lost territories resulted in a second defeat. According to the Treaty of Turkmenchay (February 10, 1828), Iran's Nakhjivan territory, too, passed into Russian hands permanently. Northern Azerbaijan thus was incorporated into the Russian Empire in the 19th century.To consolidate their rule over their new Persian conquests the Russians encouraged immigration of Christians, notably non-Orthodox religious sects from Russia, Germans from Würtemburg and Armenians from the Ottoman-Turkish Empire. This indirectly sowed the seeds of ethnic conflicts that broke out in 1905, 1918 and 1989.
In the 1870s, Russia's interest in Azerbaijan became permanent. Oil, discovered in abundance in Azerbaijan, opened a commercial vista for Russia, an opportunity that the Russians had not even dreamed of. Large-scale oil exploration started in 1872, when Russian imperial authorities auctioned the parcels of oil-rich land around Baku to private investors. Within a short period of time Swiss, British, French, Belgian, German, Swedish and American investors appeared in Baku, among them were the firms of the Nobel brothers and the Rothschild family. By 1905 Azerbaijan was supplying half the world's oil. Russians and Armenians in large numbers migrated to Baku, the center of the new oil industry, to work in the oil fields. Baku, in addition to being the center of trade in oil, became the center of Azerbaijani politics as well. Poor conditions for oil workers created a new, revolutionary underclass and as early as 1904, Social democrats, including the Bolsheviks led by Joseph Stalin, organized a general strike among the oil workers.
On November 11, 1917, after the October Revolution and amidst the turmoil of World War I and the breakup of the Russian Empire, the first government of the independent Transcaucasia was created in Tbilisi named as "Transcaucasian Commissariat" including Georgia, Azerbaijan and Armenia. The Parliament of Transacucasian Federation (Seijm) was estabilshed and Azeris gave 37 representatives to it. The Transcaucasian Federation was anti-Bolshevik in its political goals and sought the separation of Transcaucasia from Bolshevik Russia. Following the October Revolution, a government of the local Soviet was established in Baku: the so-called Baku Commune (November 1917 - 31 July 1918). The Commune was formed by 85 Social Revolutionaries and Left Social Revolutionaries, 48 Bolsheviks, 36 Dashnaks, 18 Musavatists and 13 Mensheviks. The Baku Commune was led by veteran Bolshevik Stepan Shaumyan.
Seeking to capitalize on the existing inter-ethnic conflicts among Azeris and Armenians, by spring 1918, Bolsheviks inspired and condoned civil warfare in and around Baku. In March 1918, ethnic and religious tension grew and the Armenian-Azeri conflict in Baku began. Musavat party ( founded in 1911 and endeavored to unite the Muslims, i.e., Arabs, Persians, and the Turks. Members of Musavat hoped to create a Pan-Islamic, Pan-Turkic Caliphate that would encompass the entire Muslim nation to be guided by Turkey), was accused of Pan-Turkism by Bolsheviks and their allies. Armenian and Muslim militia engaged in armed confrontation, with the formally neutral Bolsheviks tacitly supporting the Armenian side. All the non-Azeri political groups of the city joined the Bolsheviks against the Muslims. Equating the Azeris with the Ottoman Turks, the Dashnaks launched a massacre on the city's Azeris in revenge for the Armenian Genocide in the Ottoman Empire. As a result, between 3,000 and 12,000 Muslims were killed in what is known as the March Days. Muslims were expelled from Baku, or went underground.
On 26 May 1918, after the Transcaucasian Federation fell and its bodies were dissolved, the Azerbaijani faction of it was renamed the Azerbaijani National Council (NC), whose head Resulzade was unanimously elected in May 1918. Rasulzade was one of the founders of the Islamic Democratic Party of Azerbaijan also known as Musavat (equality). NC undertook parliamentary functions and proclaimed the foundation of the "Azerbaijani Democratic Republic" on 28 May 1918 in Ganja. Baku remained under the control of socialist revolutionaries until they were driven out with the help of the invading Turkish army. Azerbaijani forces, with support of the Ottoman Army of Islam led by Nuru Pasha, started their advance into Baku. When, in September, 1918 Nuri Pasha entered Baku, the Musavat government, too, returned to Baku and the city became the capital of the Azerbaijan Democratic Republic (ADR). The Turks rapidly withdrew, leaving the Azerbaijan Democratic Republic independent. Thousands of Armenians in the city were massacred in revenge for the earlier March Days.
Under the ADR, a government system was developed in which a Parliament elected on the basis of universal, free, and proportionate representation and was the supreme organ of state authority and Council of Ministers held responsible before it. Besides the Musavat majority, Muslim Social-democrats and representatives of Armenian (21 out of 120 seats), Russian, Polish, Jewish and German minorities gained seats in the parliament. It was a forward-thinking secular entity of which Azeris remain intensely proud. Among the important accomplishments of the Parliament was the extension of suffrage to women, making Azerbaijan the first Muslim nation to grant women equal political rights with men. In this accomplishment, Azerbaijan also preceded the United Kingdom and the United States. Another important accomplishment of ADR was the establishment of Baku State University, which was the first modern-type university founded in Azerbaijan. Between 1918 and 1920, the Republic of Azerbaijan had diplomatic relations with a number of states. Agreements on the principles of mutual relations were signed with some of them; sixteen states established their missions in Baku. The ADR government always remained neutral on the issue of Russian Civil War and never sided with the Red or White Army.
However, the republic lasted barely two years. By March 1920, it was obvious that Soviet Russia would attack the much-needed Baku. Vladimir Lenin said that the invasion was justified by the fact that Soviet Russia could not survive without Baku oil. According to the prevailing opinion in Moscow, Russian Bolsheviks were to assist the Baku proletariat in overthrowing the "counter-revolutionary nationalists." the Russian XI Red Army crossed into Azerbaijan, entering Baku on April 27. They demanded the dissolution of the Azerbaijani Parliament (Majlis) and set up their own Bolshevik government headed by Nariman Narimanov. To avoid bloodshed, the deputies complied with the demand and the ADR officially ceased to exist on April 28, 1920, giving way to the Azerbaijan Soviet Socialist Republic (Azerbaijan SSR) as its successor state. The 11th Red Army invaded Baku and brought the rule of the Musavat Party and ADR to an end.
In May 1920, there was a major uprising against the occupying Russian XI Army in Ganja, intent on restoring Musavatists in power. The uprising was crushed by government troops by May 31. Leaders of the ADR either fled to Menshevik Georgia, Turkey and Iran, or were captured by Bolsheviks, like Mammed Amin Rasulzade who was later allowed to emigrate and finally settled in Turkey. In his appeal to Azerbaijani people in 1953 through Voice of America, Rasulzade stressed his hope that one day it will become independent again. Gen. Selimov, Gen. Sulkevich, Gen. Agalarov, a total of over 20 generals were executed. Others were assassinated by Armenian militants like Fatali Khan Khoyski and Behbudagha Javanshir. Most students and citizens travelling abroad remained in those countries never to return again to their country. In the end, "the Azeris did not surrender their brief independence of 1918-20 quickly or easily. As many as 20,000 died resisting what was effectively a Russian reconquest." However, it has to be noticed that the installation of the Azerbaijan Soviet Socialist Republic was made easier by the fact that there was a certain popular support for Bolshevik ideology in Azerbaijan, in particular among the industrial workers in Baku.
Azerbaijan was proclaimed a Soviet Socialist Republic on April 28, 1920. Although, formally an independent state, the Azerbaijan SSR was dependent upon and controlled by the government in Moscow. It was incorporated into the Transcaucasian SFSR along with Armenia and Georgia in March 1922. By an agreement signed in December 1922, the TSFSR became one of the four original republics of the Soviet Union.
The Bolshevic regime in Azerbaijan tried to suppress the ideas of the national dignity and the traditions of independent state. Once the state language the Azerbaijani language was brought to bay and the training of national specialists was reduced to the minimum level. The government launched the policy of rusification. The classes, religious and civil privileges were eliminated and the usage of such words as "bey", "khan", "agha" was prohibited. The religion was separated from the state and education. Before Soviet power was established, about 2,000 mosques were active in Azerbaijan. Most mosques were closed in the 1930s, then some were allowed to reopen during World War II. In the 1980s, however, only two large and five smaller mosques held services in Baku, and only eleven others were operating in the rest of the country. Supplementing the officially sanctioned mosques were thousands of private houses of prayer and many secret Islamic sects. The fulfillment of religious ceremonies and lessons of shariate were abolished in the secondary schools. Religious schools were shutdown. The ancient architectural memorials -mosques, minarets-were ruined. The activity of all political parties operating in the country was suspended. Thus the dictatorship of proletariat, in fact, turned to that of the Communist party. the newly established democracy was a formal and a false one and was in the most real sense the dictatorship of communism compared with the Democratic Republic of Azerbaijan and its Parliament. Yet the dictatorship depended on the one of Moscow. Therefore, the overthrow of the Democratic Republic of Azerbaijan that was a leading and secular state system standing on the similar level with other democratic republics and was one of the most worthy achievements of the nation became the hardest tradegy of the Azerbaijani people. After the abolition of the independent state of Azerbaijani people its national wealth was misappropriated. The whole natural wealth of the country was nationalized in other words was transferred to the state. The Oil Committee of Azerbaijan was created for controlling the oil industry and it was headed by A.P.Serebrovsky, sent to Baku by V.I.Lenin. Thus, V.Lenin achieved his aim stated in the telegram sent to the Military-Revolutionary Council of the Caucasus front on March 17, 1920 as follows "The control over Baku is too important for us." The Baku oil was used by Soviet Russia. The Caspian Trade Fleet, banks, operating in the country, fish industry and other field of economy were nationalized following oil industry. Nationalization stroked a hard blow to the economy of Northern Azerbaijan, developing with increased speed in late XIX-early XX centuries. People's deprivation of property law caused weakening of national independence consciousness. Resources of Azerbaijan, particularly Baku oil began to be transported to Russia. Soviet Russia overcame fuel crisis. Northern Azerbaijan became fuel and raw material source of Russia.
Azerbaijan economy was made completely dependent on the center in result of industrialization and compulsory collectivization. Economic policy, carried out by the center was directed to depriving Azerbaijan of economic independence. This policy speedily developed in Baku, propagated as "International" city. Russian language ousted Azerbaijan language and became official language. The old alphabet was replaced by new one that meant the artificial separation of people from the national and moral wealth, reflecting its historical past. At the same time, that was again discrimination policy conducted against Azeri people.
During Stalin's brutal purges over 100, 000 Azeris were shot or sent to concentration camps, never to return. In period of repressions of the 1920s-1930s the most prominent sons of Azerbaijani people had to leave the country and run abroad to escape from the KGB prisons. Tens of thousands of Azerbaijanis were shot and exiled in result of false investigations under the name of "criminal cases", "courts", "exposures of public enemies". 29 thousand worthy persons were subject to repression. Many intellectuals and the ranks of Azerbaijani communists (who might have once leaned toward Pan-Turkism or had contacts with revolutionary movements in Iran or Turkey) were purged, so that Russification and Sovietization in the Union can proceed without having to be encumbered by old nationalists and enemies of the people. Directing the purges in Azerbaijan was Mir Jafar Baghirov, the first secretary of the Communist Party of Azerbaijan, who followed Stalin's orders without question.
During Stalin's dictatorship in the Soviet Union (1926-53), Azerbaijan suffered, as did other Soviet republics, from forced collectivization and far-reaching purges. Yet during the same period, the country also achieved significant gains in industrialization and literacy levels that were impressive in comparison with those of other Muslim states of the Middle East at that time.
During WWII, Hitler made no bones about his priority of grabbing Baku's oil-wealth for energy-poor Germany. Luckily for Baku, the German army became divided and bogged down trying to take Stalingrad on the way. Azerbaijan supplied much of the Soviet Union's gas and oil during the war with Nazi Germany and was thus a strategically important region. The German invasion of the Soviet Union in June 1941 reached the Greater Caucasus in July 1942, but the Germans never crossed into the territory of Azerbaijan. ManyAzerbaijanis fought well in the ranks of the Soviet Army (about 600-800,000) and Azeri Major-General Azi Aslanov was awarded twice Hero of the Soviet Union. About 400,000 Azeris died in World War II.
Though there were pro-Nazi Soviet Muslims as well among Azeri people. They joined Hitler's legions hoping to liberate their land from Soviet invasion. Their aspiration to join with the victorious Wehrmacht against Soviet Russia, got a green light from the German dictator. On December, 1941 a top secret memorandum ordered to create two Muslim units and one of them was Kaukasisch-Mohammedan Legion that consisted of Muslim volunteers -Azeris, Daghestans, Chechens and Ingushes. The Soviet Muslims fighting units were supposed to take part in bringing the whole Middle East into the German orbit. Like many of theirs Eastern comrade-in-arms that supported the Nazis, Soviet Muslim volunteers who surrender to Western Allies were shipped back to Soviet Union, where many of them were executed or dumped into the Gulags as traitors.
After Stalin Moscow's intrusions were less sweeping but nonetheless authoritarian. In 1959 Nikita S. Khrushchev, first secretary of the Communist Party of the Soviet Union, moved to purge leaders of the Azerbaijani Communist Party because of corruption and nationalist tendencies.
In the 1960s, the signs of a structural crisis in the Soviet colonial system began to emerge. Besides economical problems, Ethnic tensions, particularly between Armenians and Azerbaijanis began to grow, but violence was suppressed. In an attempt to end the growing structural crisis, in 1969, the government in Moscow appointed Heydar Aliyev as the first secretary of the Communist Party of Azerbaijan. He temporarily improved economic and political conditions in Azerbaijan. In 1982 Aliyev was made a member of the Communist Party's Politburo in Moscow, the highest position ever attained by a Muslim in the former Soviet Union. In 1987, when Perestroika started, he was forced to retire by the Soviet leader Mikhail Gorbachev whose policies Aliyev opposed.
During Perestroika and Glasnost of the Gorbachov era , the lists of Azerbaijani intellectuals who were imprisoned and executed during the Stalinist Repression were published in the newspapers. The KGB of Azerbaijan was transformed into the Ministry of National Security (MNS), which sayd it wanted to reveal all of the crimes of the Stalinist period. The names that were published included scholars like Vali Khuluflu and Salman Mumtaz and poets like Mikayil Mushvig and Huseyn Javid. The names of killers from the NKVD - Narodni Kommisariat Vnutrenikh Del (The People's Ministry of Internal Affairs), the forerunner to the KGB during the Stalinist period - were also revealed, including Grigorian, Markarian, Topuridze and Atakishiyev.The NKVD assassins all worked under the supervision of Mirjafar Baghirov, who ordered them to kill the best representatives of the Azerbaijani people. Baghirov's last words at his trial were published as well. He said: "Yes, I am guilty, but if I am the only guilty one, it is insufficient to shoot me, it is necessary to cut me into a thousand pieces." Baghirov wanted to say that thousands of other Soviet authorities and the Soviet system as a whole were guilty as well, but they were not punished at that time.
The late 1980s, were characterized by increasing unrest in the Caucasus, initially over the Nagorno-Karabakh issue. A political awakening came in February 1988 with the renewal of the ethnic conflict, which centered on Armenian demands for the unification of Nagorno-Karabakh Autonomous Oblast of Azerbaijan SSR with Armenian SSR. Armenians expelled hundreds of thousands of Azeris from Karabakh and Armenia by March 1988, while pogroms of the Armenian population in Baku and Sumgait took place. Russia forced enforced military rule on several occasions but unrest continued to spread. The ethnic strife revealed the shortcomings of the Communist Party as a champion of national interests, and, in the spirit of glasnost, independent publications and political organizations began to emerge. Of these organizations, by far the most prominent was the Popular Front of Azerbaijan (PFA), which by the fall of 1989 seemed poised to take power from the Communist Party. The nationalist opposition PFA led a wave of protest strikes expressing growing political opposition to Azerbaijan Communist Party (ACP). Under this pressure, the ACP authorities bowed to opposition calls to legalize the PFA and proclaim Azerbaijani sovereignty. In September 1989, the Azerbaijani Supreme Court passed a resolution of sovereignty, among the first such resolutions in the Soviet republics. The resolution proclaimed Azerbaijan's sovereignty over its land, water, and natural resources and its right to secede from the Soviet Union following a popular referendum. The Presidium of the Supreme Soviet, the legislative body of the Soviet Union, declared this resolution invalid in November 1989.
Meanwhile, in response of Armenian demands for the unification of Nagorno-Karabakh Autonomous Oblast of Azerbaijan SSR with Armenian SSR, Azerbaijanis unleashed a wave of violence against Armenian residents of Baku and other population centers, causing turmoil that seemed to jeopardize ACP rule. in January 1990 Moscow deployed forces of its Ministry of Internal Affairs and of the Committee for State Security (Komitet gosudarstvennoi bezopasnosti--KGB), and the military in a brutal suppression of these riots. Unrest culminated in violent confrontation when Soviet troops killed 132 nationalist demonstrators in Baku on January 20, 1990. Moscow also began a crackdown on the APF and other opposition forces in Baku and other cities and Gorbachev denounced the PFA for striving to establish an Islamic republic. The Red Army intervention in Baku turned public opinion squarely against Russia.
Azerbaijan declared its independence from the USSR on August 30, 1991, and became part of the Commonwealth of Independent States. By the end of 1991 fighting in Nagorno-Karabakh had escalated into a full scale war, which culminated into a tense cease-fire that has persisted into the 21st century. Although a cease-fire was achieved, the refusal to negotiate by both sides resulted in a stalemate as Armenian troops retained their positions in Karabakh as well as corridors taken from Azerbaijan that connect the enclave to Armenia.