With the pact, the empire recognized the independence of Azerbaijan, which could in return request its military help in case of any threat.
The newly founded state managed to form a national army on June 26, 1918.
After the republic's declaration of independence in Georgia, Fatali Khan Khoyski, Azerbaijan's first prime minister, formed the government in Ganja, now northwestern Azerbaijan, in June, as he was not able to travel directly to Azerbaijan's current capital Baku since the city was then controlled by Armenian militants and Bolsheviks, a Marxist revolutionary party.
Near the end of World War I, on Sept. 15, 1918, an elite Ottoman force under the leadership of Nuri Pasha (Killigil) called the Caucasus Islamic Army was sent to Azerbaijan in response to Azerbaijan's plea, along with the Azerbaijani National Army and volunteer forces, and liberated Baku from Armenian and Bolshevik occupation, paying the price in 1,132 people killed.
Enver Pasha, then Ottoman minister of war-also an elder brother of Ottoman Gen. Nuri Pasha-personally conveyed the message to the Ottoman Empire that Baku had been liberated from Armenian gangs.
The Caucasian Islamic Army played a pivotal role in Azerbaijan's life, the liberation of Baku, and turning the city into the capital.
Baku's liberation paved the way for the transfer of the capital from Ganja to Baku and ensuring Azerbaijan's territorial integrity, and set the basis for its contemporary boundaries.
In December 1918, the first decision of the newly established Azerbaijani parliament was to place a monument for the "martyred Ottoman soldiers and officers" at the highest spot in Baku.
Though plan and sketches for the monument were prepared, the Soviet occupation in April 1920 did not allow for its construction. The monument was finally erected in 1999-2000.
Azerbaijan first declared independence from the Russian Tsar regime but was toppled after almost two years in 1920 by the Soviet Union.
Regarded as the first secular and democratic republic in the East, Azerbaijan made reforms in many fields, including freedom of education, religion, and conscience.
In its Declaration of Independence, the country granted equal rights to all citizens, regardless of race, religion, sect, or gender.