The Lankaran Operation (1919) was a military operation carried out by the Azerbaijani Army Corps (ADR) in the southern region of Azerbaijan to ensure the country's territorial integrity in August 1919.

When the ADR was announced, it could not immediately extend its sovereignty over the entire country, and the Lankaran Operation gradually evolved. During this time there was a struggle in the southern territories of the ADR, particularly in the districts of Javad and Lankaran, involving Azerbajani partisans, Bolsheviks, and the White Army. As a result of this struggle, the Azerbaijani forces emerged victorious, and the Lankaran Operation led to the complete dominance of the entire region under the authority of the ADR.

Background Until the fall of 1918, the Azerbaijani Army and the Islamic Army of the Caucasus cleared Baku and Karabakh of foreign forces. So except for Lankaran, a new government took control over the entire territory of Azerbaijan. Despite the next intended march direction being elsewhere, the situation changed due to the defeated state of the Ottoman Empire signing the Mudros Armistice, and the arrival of British forces in Baku. Consequently, the march planned for Lankaran was postponed. Lankaran held a strategically significant position that attracted the attention of various powers. Hence, despite being under the control of the Musavatists in early 1918, Bolsheviks arrived in the region aboard the ship "Aleksandr Jander" in April of the same year and took control of the area.

The White army takeover and the local population's reaction However, the Bolsheviks' position weakened with the liberation of Baku. This time, the Russian nationalist forces, supported by the Russian population previously relocated to the region, gained strength. Colonel Ilyashevich, an Agha Javadi, and closely associated with Denikin, led these forces. He was formerly the commander of the 29th Russian Army stationed here to safeguard the Russian Empire's border with Iran. Ilyashevich, like other combatant Russian officers, regarded the territories of the Russian Empire as indivisible and did not acknowledge Azerbaijan's independence. One of his main objectives was to establish bases and create conditions for the Denikinist forces attacking here. Therefore, he relocated his headquarters from Bilasuvar village of Javad district to Prishib village of Lankaran District. Historian Mehman Suleymanov estimates his army to have had around 6,000 troops at that time. Under the pressure of these forces, the establishment of the ruling body was discussed in a meeting held on August 4–5. According to the decision made, a "Temporary Dictatorship" consisting of five people was created to govern these districts. This dictatorship was also referred to as the "Pentarchy Dictatorship." The forces behind their support were the Russian population in the region, aided by Denikin's forces and the Russian National Committee in Baku. Due to the activities of these forces, the local population sought assistance from the Azerbaijani army and Nuru Pasha in due time. Although they indicated they would resolve this issue shortly, the necessity of withdrawing the Ottoman forces from the region made it impossible. As the British supported the Denikinists, they could not organize a march into the region officially after October.In response to the locals' new appeal, the Foreign Minister of Azerbaijan Central Executive Committee (CEC) responded that this matter should be raised before General Thomson, the British military commander in Baku. The delegation led by Teymur bey Bayrampashov met with Thomson, expressing their desire for the reorganization of the region with Russian officers and the establishment of Azerbaijani authority. Thomson indicated that measures would be taken in response. However, shortly after, the Russian officers declared the creation of the Lankaran Republic and formed a government under Suxorukov. This new government sought recognition from Azerbaijan and therefore dispatched representatives to Baku under Gerasimov's leadership. Upon the representatives' return, a council was organized in the Prishib village, and according to the decision made, the region was not to be handed over to Azerbaijan. It was envisaged that the area would be included as an independent entity under the Mugan province.

Establishment of Mughan Soviet Republic and resistance of local Azerbaijanis Because it was relatively easy to march to Baku from there, the Bolsheviks were drawn to the area and sought to foment rebellion. In the summer of 1919, the Communist party's Caucasus Regional Committee began preparations to seize power in Lankaran through armed rebellion. According to the plan devised for the uprising, the Red partisans and other Bolshevik forces were to seize the toy institution's building, the military headquarters, the radio station, and the naval agency. The rebellion started on April 25. On that day, there was to be a meeting of Russian officers in the city, and at midday, the officers had dispersed to their homes for lunch. It was at this time that the Bolsheviks launched a sudden attack. Within a few hours, crucial parts of the city were taken. All the key figures in the institution set up by the officers were arrested. Jirikov was brought in as the temporary leader of the newly established revolution. On May 15, a council of Mughan village deputies was called in Lankaran to resolve the issue of authority. Many of the individuals at the congress were not Azerbaijani. David Chitkin was appointed as the president of the "Mughan Country Council," and Shirali Akhundov became his deputy. Following this announcement, a substantial amount of Bolshevik aid was brought to the region. After being defeated by Denikin in the Northern Caucasus, a part of the XI Army was compelled to retreat to Baku. Under Sergo Ordzhonikidze's orders, 200 of them went to Lankaran. Following some other activities, the military forces of the new institution grew to about 5,000 people. However, the Bolshevik authority was not welcomed by the local population, and even the Russian population started to gather around the White army officers. Around the villages of Novo-Qulyayevka and Petropavlovka, the White Army officers successfully organized a 5,000-strong armed unit. On June 15, they held a congress in Prişib and decided to attack Lankaran to overthrow the Soviet authority. Additionally, Azerbaijani-formed units against the Bolshevik rule also resisted. Huseyn Ramazanov organized a unit in Astarabad that launched an attack on the villages of Shahagac and Alekseyevka in May. However, despite the efforts of Ramazanov's partisan unit, the more substantial Bolshevik forces repelled their attack. In June, Ramazanov attacked Astarabad again, and although additional forces were sent to the Bolsheviks from Lankaran during several days of intense fighting, they could not secure a victory and had to retreat. Despite multiple attempts by the Bolsheviks to escape the situation they found themselves in, none of their efforts improved their condition. On June 23, the White army officer Khoshev attacked Lankaran with a force of 500.  However, the White army forces were defeated and retreated from Lankaran. Despite their victory, the Bolsheviks suffered considerable losses in battles, and Ulyansev, the President of the Military Revolutionary Council, was killed. In the region, alongside the increasing number of Azerbaijani forces desiring the restoration of the Azerbaijani government, their activities were also expanding. Towards the end of June, a live force led by Malik Yeghanov arrived from Baku and merged with Ramazanov's unit. Small groups led by Huseyn Ali and Rashid Khan also joined another partisan unit led by Ramazanov and Shahvere. Shahvere's units were concentrated in the Zirvand Mountains. In late July, Ramazanov and Shahverə's units attacked Astara, Shahagac, and Alekseyevka. In Astara, 20 Czechs, 10 Mensheviks, and 10 soldiers were killed. In Shahagac, a 15-member Soviet post was eliminated. Another group of partisans encountered 200 Bolshevik infantrymen, 60 cavalrymen, and a mountain artillery battery in Alekseyevka. Bolshevik cavalry blocked the partisans' path to Iran. The activation of the artillery complicated their situation significantly. The active movements of the first division of the Lankaran camp under the command of Armenian Bolsheviks and the Muğan cavalry squadron resulted in the loss of the military initiative for the partisans, forcing them to retreat back towards the border mountains.

Overthrow of Bolshevik power On July 5, 1919, a new congress of the White army, Malakan, and other Russians was held in Prisib. The decision was made to clear the region of Bolsheviks. In the latter half of July, the White Army launched a decisive attack on Lankaran. Azerbaijani partisans in the region simultaneously assaulted the Bolsheviks. Ramazanov and Shahverə's units merged, and it was decided in the Military Council to attack the city from three directions. Ramazanov was to attack from the south, Shahvere from the west, and Haji Osman from the east. The Azerbaijani attack succeeded, compelling the Bolsheviks to retreat. Although the Bolsheviks were pressed towards the lighthouse, they were able to resist due to the heavy weapons they had. The remaining part of the city fell into the hands of Azerbaijani partisans. The territory from the northern point of the city to Haji Qurban Street was under Shahvere's control, from the western side of the city to the left bank of the coast was under Ramazanov's control, and from Sutamordob to the right bank of the Lankaran river was under Haji Osman's control. The Azerbaijani partisans were resolute in continuing the assault due to the consistent support they received. However, the Bolsheviks knew they would ultimately be defeated and thus decided to head to the Sari island. However, when they were evacuating the city, they decided not to give these places to the Azerbaijanis, but to the Russians, even if they were White army. Thus, on July 24–25, Mughan's forces, that is the White army, were released in various significant locations within the city, and all captured officers were set free.

The re-establishment of the White army power and the struggle of Azerbaijanis The White army convened their new congress in Prishib, and according to the decision, the decisions made at the congress called by the Soviets in May are considered null and void, and it transfers its powers to the current congress. After being released from prison, Ilyashevich took over the leadership again and the first actions he took were against the Azerbaijani partisans. In the letter he sent to Yusif Bey, the head of one of the partisan groups, he stated that the Bolshevik government had already been overthrown, that his armed group was no longer needed in the region, therefore, he had to leave Russian Astara within 12 hours, otherwise he would attack. Yusif Bey said in his answer that he does not recognize any other government except the Azerbaijani government, and therefore, he will not lay down his arms.

AXC intervention in the events