Following the signing of the Gulustan and Turkmanchai treaties in 1813 and 1828, respectively, a very rapid mass resettlement occurred of the Armenians into Azerbaijani lands, resulting in the artificial territorial division of the region.
Between 1905 and 1907, the Armenians carried out a series of large-scale offensive actions against the Azerbaijanis. The attacks began in Baky and then extended over the whole of Azerbaijan and Azerbaijani villages in the territory of present-day Armenia. Hundreds of settlements were destroyed, and thousands of civilians were killed.
Taking advantage of the situation following World War I and the February and October 1917 revolutions in Russia, the Armenians began to pursue the implementation of their plans under the banner of Bolshevism. Thus, under the watchword of "combating counter-revolutionary elements", in March 1918 the Baky Armenian community began to implement a plan aimed at eliminating the Azerbaijanis from Baky province. Apart from Baky, solely because of their ethnic affiliation, thousands of Azerbaijanis were also killed in the Shamakha and Guba districts, as well as in Garabagh, Zangezur, Nakhchivan, Lankaran, and other regions of Azerbaijan.