In December 1989, Azerbaijanis living in regions bordering Iran ripped down border fences, demanding closer ties with ethnic Azerbaijanis living in Iran. The local authorities in Jalilabad surrendered to rioters, turning over administration to the Popular Front of Azerbaijan. This was followed by a non-violent turnover of the Lankaran administration to the Popular Front two weeks later.
On January 9, 1990, the Supreme Soviet of the Armenian SSR voted to include Nagorno-Karabakh in its budget and allowed its inhabitants to vote in Armenian elections, thus disregarding Soviet authority and Azerbaijani jurisdiction and causing rage throughout Azerbaijan. This led to demonstrations which demanded the ousting of Azerbaijani communist officials and called for independence from the Soviet Union. Their rhetoric was, according to a Human Rights Watch report, "heavily anti-Armenian". On January 12, the Popular Front organised a national defence committee with branches in factories and offices in Baku to mobilise people for battle with Armenians.The invasion of the Soviet Army in Baku. 20 January 1990.
Local Azerbaijani authorities were unable to restore order because of internal quarreling and divisions that paralyzed their ability to act. Azerbaijani authorities also ordered the 12,000-strong Interior Ministry troops to abstain from intervening in the Baku riots and numerous Soviet army and fleet units of the Baku garrison and Caspian Flotilla did not intervene to stop the riots, claiming that they had no orders from Moscow authorities. On 13 January, massive anti-Armenian pogroms started which resulted in ninety deaths, while thousands fled or were evacuated by the Soviet military.
On January 15, the authorities declared states of emergency in other parts of Azerbaijan (but not in Baku). At the same time, fearing an intervention of the central Soviet authorities, Popular Front activists began a blockade of military barracks. They had already taken de facto control in a number of Azerbaijani regions.
On January 18, the Popular Front ordered supporters to barricade the main access routes into Baku using hundreds of cars, trucks and buses. The next day, Soviet authorities evacuated its representatives and local officials, moving them to military command posts in the outskirts of the city where Soviet Minister of Defence Dmitry Yazov and Interior Minister Vadim Bakatin were positioned.
On 19 January, the Presidium of the Supreme Soviet of the USSR approved the decree signed by M. Gorbachev, introducing state of emergency in Baku and some other places in the Azerbaijani SSR. The decree stated:
″In connection with dramatic escalation of the situation in the city of Baku, attempts of criminal extremist forces to remove from power by organizing mass unrest legally acting state authorities and in the interests of the protection and security of citizens, the Presidium of the Supreme Soviet of the USSR, guided by point 14 of the article 119 of the Constitution of the USSR, decrees: To declare since 20 January 1990 state of emergency in the city of Baku, by extending to its territory the effect of the Decree of the Presidium of the Supreme Soviet of the USSR from 15 January 1990.″
The decree contravened legal acts in force at the time, which provided that the Presidium of the Supreme Soviet of the AzSSR would have to turn to the central government with the relevant plea.
Late at night on January 19, 1990, after demolition of the central television station and termination of phone and radio lines by Soviet special forces, 26,000 Soviet troops entered Baku, smashing through the barricades in order to crush the Popular Front. As claimed by Mikhail Gorbachev, gunmen of the Azerbaijani National Front opened fire on the soldiers; however, findings of the Moscow-based non-governmental organisation Shield found no evidence of "armed combatants of Azerbaijani Popular Front", which was used as a motive to crush the civilian population on January 20.
The independent Shield organisation which consists of a group of lawyers and officers in reserve, observed human rights violations in the army and its military operations, concluded that the army waged a war on its civilians and demanded to start a criminal investigation against the Minister of Defence, Dmitry Yazov, who had personally led the operation. The Azerbaijani Interior Ministry officials helped Popular Front activists in stirring disorder by providing them with weapons, technical facilities, and informing them about the movement of army units.
The troops attacked the protesters, firing into the crowds. The shooting continued for three days. They acted pursuant to a state of emergency, which continued for more than four months afterward, declared by the Presidium of the Supreme Soviet of the USSR, signed by President Mikhail Gorbachev. The state of emergency was, however, disclosed to the Azerbaijani public only several hours after the beginning of the offensive, when many citizens already lay dead or wounded in the streets, hospitals and morgues of Baku.
Almost the whole population of Baku turned out to bury the dead on the third day, January 22. For another 40 days, the country stayed away from work as a sign of mourning and mass protest.