Ethnic tension between Armenians and Azerbaijanis can be traced back to the pre-Soviet Armenian–Azerbaijani War. The deportation of Azerbaijanis from Armenia ensued as an act of forced resettlement and ethnic cleansing throughout the 20th century. As a result of Armenian-Azerbaijani interethnic conflict in the beginning of the 20th century, as well as Armenian and Azerbaijani nationalists' coordinated policy of ethnic cleansing, a substantial portion of the Armenian and Azerbaijani population was driven out from the territory of both Armenia and Azerbaijan. According to the Russian census of 1897, the town Erivan had 29,006 residents: 12,523 of them were Armenians and 12,359 were Azerbaijanis. As outlined in the "Brockhaus and Efron Encyclopedic Dictionary", Azerbaijanis (Tatars) made up 12,000 people (41%) of the 29,000 people in the city. However, during the systematic ethnic cleansings in the Soviet era and the systematic deportation of Armenians from Persia and the Ottoman Empire during the Armenian genocide, the capital of present-day Armenia became a largely homogenous city. According to the census of 1959, Armenians made up 96% population of the country and in 1989 more than 96,5%. Azerbaijanis then made up only 0,1% of Yerevan's population. They changed Yerevan's population in favor of the Armenians by sidelining the local Muslim population. As a result of the Nagorno-Karabakh conflict, not only were the Azerbaijanis of Yerevan driven away, but the Azerbaijani mosque in Yerevan was also demolished.