Soviet invasion of Azerbaijan during Russian Civil War
The Red Army invasion of Azerbaijan, also known as the Sovietization or Soviet invasion of Azerbaijan, took place in April 1920. It was a military campaign conducted by the 11th Army of Soviet Russia with the aim of installing a new Soviet government in the Azerbaijan Democratic Republic. This invasion occurred simultaneously with an anti-government insurrection organized by local Azerbaijani Bolsheviks in the capital city of Baku. As a result of the invasion, the Azerbaijan Democratic Republic was dissolved, and the Azerbaijan Soviet Socialist Republic was established.
During 1919–1920, Azerbaijan was grappling with a severe political and socio-economic crisis, and the internal political situation was highly volatile. Armed conflicts were occurring between various political and social factions across the provinces of the country. Simultaneously, since the collapse of Soviet power in 1918, underground organizations comprising diverse political parties and socialist-oriented groups were active. These factions united with the AC(b)P in February 1920 to achieve their political objectives.
In April 1920, the 11th Red Army, having defeated the Volunteer Army in the North Caucasus, approached Azerbaijan's borders. Azerbaijani Bolsheviks were preparing for armed uprisings set to begin on the night of April 26–27. Alongside the uprisings in Baku, several Soviet armored trains crossed into Azerbaijan, conducting successful deep raids behind Azerbaijani lines.
After gaining control over key strategic locations in the capital, the Bolsheviks issued an ultimatum to the Azerbaijani government and parliament, demanding the transfer of power. In an emergency session, the parliament voted to hand over power to the Azerbaijani Communist Party. With the support of the 11th Red Army entering the country, the new government quickly brought the remaining territories of Azerbaijan under its control. The principal outcome of these events was the establishment of Soviet rule in Azerbaijan, under the leadership of the Communist Party, and the proclamation of the independent Azerbaijani Soviet Socialist Republic. Azerbaijan SSR functioned as an independent state until 1922.
Background.
The revolutionary movement in Azerbaijan after 1918.
In July 1918, Soviet power in Baku was overthrown, and in September, following its capture by the Caucasian Islamic Army, the city became the capital of the Azerbaijan Democratic Republic. However, various parties aligned with Bolshevik ideology and socialist-oriented organizations such as "Hummat" and "Adalat" continued to operate clandestinely. Initially, these groups were significantly weakened. During the August-September 1918 capture of Baku, 100 members of "Adalat" were killed, and 95 were captured; the survivors and escapees resorted to underground activities. The "Hummat" organization, almost entirely dismantled after the fall of Soviet power, began to reorganize only at the end of 1918.
Unlike the Bolshevik faction of "Hummat," its democratic wing participated in the Declaration of Independence of Azerbaijan and established its own faction within the National Council. Representatives of this faction (Samad aga Agamalioglu, Aliheydar Garayev, Ahmad bey Pepinov, Gasim Jamalbeyov, Ibrahim Abilov, Akbar agha Sheykhulislamov) later joined the Socialist faction in Azerbaijan's first parliament, which began functioning in December 1918. Among these deputies, Samad aga Agamalioglu and Aliheydar Garayev played significant roles. Some members of the Socialist "Hummat" later joined the Bolsheviks in 1920 and became active supporters of the establishment of Soviet power in the country.
The formation of the Left SR (Socialist-Revolutionary) Party in Azerbaijan, including members such as Ruhulla Akhundov, Ali Bayramov, and Habib Jabiyev, occurred in November 1918 in alliance with the Bolsheviks. On the national question, they differed from the Russian Left SRs, advocating for the establishment and recognition of Azerbaijan as an independent Soviet republic. By the spring of 1919, most members of the Azerbaijani Left SR organization had merged with "Hummat". 
In December 1918, labor organizations (factory and industrial committees) united to form the Baku Workers' Conference, which soon became the highest permanent representative body of Baku workers. Anastas Mikoyan described it as "a kind of Soviet," while Sergey Kirov referred to it as a "workers' parliament." Within this body, intense struggles unfolded between Bolsheviks on one side and Mensheviks and SRs on the other. According to the Mensheviks and SRs, the authority of the Workers' Conference should be limited to addressing workers' wages and living conditions, with political struggles confined to parliament. Later, the Bolsheviks proposed the establishment of a Soviet of Workers', Soldiers', and Peasants' Deputies, a proposal approved at the Workers' Conference on January 22, 1919. By mid-March, the leadership of the Workers' Conference had effectively fallen into the hands of the Bolsheviks, who marginalized the Mensheviks and SRs, turning it into the supreme political body of Baku workers. 
During the existence of the Azerbaijan Democratic Republic, the Bolsheviks began publishing several newspapers. The following were published in Azerbaijani and Russian: "Nabat", "Füqəra Sədası", "Kommunist", "Molot", "Proletari", "Raboçiy Put", "Bednota", "Azərbaycan Füqərası", "Bakı Fəhlə Konfransının Xəbərləri", "Zəhmət Sədası", "Hürriyyət", "Həqq", "Raboçaya Pravda", and "Novıy Mir". On July 30, 1919, the Bolsheviks' newspaper "Bakı Fəhlə Konfransının Xəbərləri" ("News of Baku Workers' Conference", edited by Menshevik Aliheydar Garayev, became the first to publish a translation of the new program of the Russian Communist Party (Bolsheviks) into Azerbaijani. However, the program could not be fully published (only five issues were released) as the government shut down the newspaper. The Bolsheviks later published the program separately as a brochure. As Nariman Narimanov later noted, copies of these newspapers even reached Moscow, and Lenin himself was informed about them.
Several revolutionary-minded individuals, including sympathizers of the Bolsheviks, worked within government institutions and law enforcement agencies. For instance, Chingiz Ildirim, with the support of deputy Garayev, initially became a member of the council under the Karabakh General-Governorship, later serving as the deputy head of Baku Port and simultaneously as deputy head of the naval base. Regarding revolutionary activities in military units and the navy, Mirza Davud Huseynov wrote: 
In the Baku garrison, we had cells in virtually every military unit...The same was true for the navy... At that time, comrade Ildırım was an assistant to the head of Baku Port, and we operated through him.
Nariman Narimanov's cousin, Muzaffar Narimanov, a member of "Hummat," served in the Azerbaijani army, later joining the Musavat counterintelligence service, and subsequently worked in the Ministry of Labor's conflict department. The wife of RCP(b) member Ali Bayramov, Jeyran Bayramova, worked as a secretary in the legislative department of the Azerbaijani parliament. Another RKP(b) member, Leonid Beriya, was employed in the "Organization for Combating Counter-Revolution" operating within Azerbaijan's Ministry of War.
The Slogan of "Independent Soviet Azerbaijan".
During a conversation in the autumn of 1918 with Dadash Bunyadzade, a member of "Hummat", V.I. Lenin remarked: 
The loss of Stepan [Shaumyan] and the 26 Commissars should not halt the work we have begun. It is necessary to regroup, enlighten, and liberate the Azerbaijani workers and peasants who have been deceived by the Mensheviks and Socialist Revolutionaries.
At that time, Bunyadzade informed Lenin that Azerbaijani communists held differing views regarding the future state structure of Azerbaijan:
When Ilyich was informed that there were two currents in Azerbaijan—one advocating for the establishment of an independent socialist Soviet republic after the liberation of Baku and Azerbaijan, and another proposing that no republic be created, instead dividing Azerbaijan into provinces to be annexed to the RSFSR—he expressed his view unequivocally. He stated that the idea of creating an independent republic was correct, while the second notion amounted to colonialism and, indeed, folly.
On May 2, 1919, the All-Baku Party Conference adopted the slogan of "Independent Soviet Azerbaijan." During the conference of Transcaucasian party organizations held in Baku on May 7-8, the Baku party organization proposed this slogan. However, the conference, particularly members of the Caucasus Bureau of the Russian Communist Party (Bolsheviks) in Tiflis, rejected it. Despite this, on July 19, a joint meeting of the Politburo and Organizational Bureau of the Central Committee of the RCP(b) decided to recognize Azerbaijan as an independent Soviet republic in the future. The Bolshevik newspaper "Füqəra Sədası" reported on August 17 that the idea of establishing the Azerbaijani Soviet Republic had been approved by V.I. Lenin. On August 20, Y.D. Stasova, Secretary of the Central Committee of the RCP(b), wrote to the Caucasus Regional Committee, stating: 
We consider the proclamation of an independent Soviet Republic of Azerbaijan entirely appropriate.
On May 22, 1919, Anastas Mikoyan wrote to Lenin:
In Azerbaijan, there are greater oil resources, sharper social contradictions, more fertile grounds for a class-based upheaval, and more discontent and hatred against the existing government. Independence [of Azerbaijan Democratic Republic] is merely an illusion... To ensure the success of the revolutionary movement, remove national barriers on the path to revolution, and win the trust of the Muslim laboring masses in us, the internationalists, the Baku organization has recognized the Independent Soviet Azerbaijan as an entity with close political and economic ties to Soviet Russia. This slogan is highly popular, capable of uniting all Muslim laborers around it and mobilizing them for an uprising.
According to the memoirs of Nariman Narimanov and Sergey Mironovich Kirov, Lenin believed that Soviet Azerbaijan should serve as a model for the peoples of the East.
Domestic political situation in Azerbaijan.
Socio-economic environment.
At the end of 1919 and the beginning of 1920, Azerbaijan was engulfed in a deep political and socio-economic crisis. The economic downturn caused by World War I, compounded by the severance of economic ties with Russia, had left the republic in a dire situation. Peasant uprisings broke out in several regions, the agricultural economy was collapsing, and the oil industry was in a catastrophic state.
Compared to 1913, by early 1920, oil production had declined to only 39% and refining to 34.5% of the previous levels. Of the 40 existing oil refineries in the country, only 18 were operational. The damage inflicted on the oil industry by foreign intervention was estimated at 750 million gold rubles. At the second congress of the Musavat Party, the party's leader, Mahammad Amin Rasulzade, remarked on the oil crisis, noting that workers in the oil fields were being maintained at the state's expense, while oil industrialists were considering halting operations entirely. At the time, the oil fields were described by the Communist newspaper as a "graveyard."
By 1920, the total area of cultivated agricultural land had decreased by 40% compared to the pre-war period. Cotton cultivation had dropped by 99%, vineyards by 30%, and livestock production had declined by 60-70%. Irrigation systems were in disrepair, resulting in cotton cultivation amounting to only 2.3% of pre-war levels.
The instability in Azerbaijan was not solely due to the conflict between the wealthy and the poor, which exacerbated social tensions. The struggle of the working class to improve their economic and social conditions also contributed to the crisis. By September 1919, the number of unemployed in Baku had reached 30,000, and Iranian oil drillers were returning to their homeland. In October of the same year, the real wages of Baku oil workers were only 18% of their 1914 levels. Simultaneously, the prices of goods had soared dramatically. For example, in the second half of 1919, the price of bread increased by over 100%, meat by 56%, fish by 150%, eggs by 96%, butter by 200%, underwear by 100%, wool fabrics by 233%, and footwear by 135%. The economic blockade imposed by General A. I. Denikin’s Volunteer Army in late 1919 further deepened the food crisis. Denikin sought to prevent Georgia and Azerbaijan from purchasing food from territories liberated from Bolshevik control, accusing them of acting "contrary to Russian state interests." 
Kazimzadeh, a member of the Musavat Party in parliament, lamented the intolerable living conditions in the capital, where all workers’ organizations had been disbanded. Starving workers were forced to labor for 17-18 hours a day instead of the standard 8 and could be dismissed at any time. On March 22, 1920, the Minister of Internal Affairs, Mustafa Bey Vekilov, officially stated: 
The republic's supreme executive authority had no intention of intervening in the struggle to improve the economic and legal conditions of the working class but declared its determination to suppress any actions directed against the state by all possible means.
In addition, armed clashes between Armenians and Azerbaijanis over disputed territories between Azerbaijan and Armenia were ongoing. Azerbaijan faced a significant influx of refugees, who brought with them epidemics and famine to the country's rural districts. Lacking material and financial resources, the Musavat government was unable to cope with the problems of refugees and widespread poverty.
Armed conflicts in uezds.
In rural areas, peasants were seizing the estates of landowners, sometimes