On April 27, 1920, the government of the Azerbaijan Democratic Republic received notice that the Soviet army was about to cross the northern border and invade the Azerbaijan. Faced with such a difficult situation, the government officially surrendered to the Soviets, but many generals and local Azeri militias kept resisting the advance of Soviet forces and it took a while for the Soviets to stabilize the newly proclaimed Azerbaijan Soviet Socialist Republic, headed by leading Azeri Bolshevik Nariman Narimanov.