Though the date of their original settlement is unclear, Baku's Armenian population swelled during the 19th century, when it became a major center for oil production and offered other economic opportunities to enterprising investors and businessmen.
[7] By the beginning of January 1990, only 50,000 Armenians remained in Baku compared to a quarter million in 1988; most of these left after being targeted in a pogrom that occurred before the dissolution of the Soviet Union and the early stages of the first Nagorno-Karabakh War.
The favorable economic conditions provided by the Imperial Russian government allowed many Armenians to enter the burgeoning oil production and drilling business of Baku.
[14] The growing tension between Armenians and Azeris (often instigated by the Russian officials who feared nationalist movements among their ethnically non-Russian subjects) resulted in mutual pogroms in 1905–1906, planting the seed of distrusts between these two groups in the city and elsewhere in the region for decades to come.
[18] Situation escalated when the Muslims, alarmed by the growing power of the Armenians, tried to seek help from outside, inviting the former tsarist all-Muslim Savage division into the city.
Despite the Armenian efforts to stay neutral and be ready only for self-defence, soon a decision was made to join the forces with the Bolsheviks to resist the Muslim military attack.
The fighting resulted in the victory of the Armenian-Bolshevik coalition, which left thousands of casualties from both sides, among which many were Muslims (3000 according to the estimates of Shaumian, and 12000 according to the Azerbaijani sources).
The mainly-Armenian populated quarter of Baku called Ermenikend grew from a tiny village of oil workers into a prosperous urban community.
[28] While in the Nagorno-Karabakh Autonomous Oblast, Armenians often chose to disassociate themselves from Azerbaijan and Azeris, cases of mixed Azeri–Armenian marriages were quite common in Baku.
[31] However, many Armenian refugees from Azerbaijan later reported that despite ethnic tensions taking place in Nagorno-Karabakh, the relationships with their Azeri friends and neighbors had been unaffected.
Non-official sources estimate that the number of Armenians living on Azerbaijani territory outside Nagorno-Karabakh is around 2,000 to 3,000, and almost exclusively comprises persons married to Azeris or of mixed Armenian-Azeri descent.
[39] The prominent Armenian businessman and philanthropist Calouste Gulbenkian also began to build ties and invest heavily in the Baku oil industry, the fortunes he made there being the source for his nickname of "Mr. Five Percent.
The large-scale construction and expansion of the city attracted numerous Russian and Armenian architects, many of whom had received their education in Russia (in particular, Saint Petersburg) or other parts of Europe.
Many of the buildings they designed, influenced by Neo-Classical themes then popular in Russia and also styles and motifs taken from medieval Armenian Church Architecture, still stand today.
[citation needed] Among the most well-known examples are the Azerbaijan State Philharmonic Hall and the Commercial College of Baku (both designed by Ter-Mikelov).
[45] During the Imperial Russian period, the community enjoyed a vibrant literary culture, as seen in the publication of dozens of Armenian-language newspapers, journals, and magazines.
[46] Also the Armenian Community of Baku built the first Philanthropic Society of Azerbaijan, maintaining the then-richest library of Transcaucasia,[47] but then was shut down by the Soviet Government.