The Bahá'í community of Ashgabat (also spelled `Ishqábád, Ashkhabad) was founded in about 1884, mostly from religious refugees from Persia. One of the most prominent members of the community was Mirza Abu'l-Fadl Gulpaygani, an Apostle of Bahá'u'lláh, who lived in Ashgabat off and on from 1889 to 1894. A short time after moving there, the assassination of one of the Bahá'ís there, Haji Muhammad Rida Isfahani occurred and Gulpaygani helped the Bahá'í community to respond to this event and later he was the spokesman for the Bahá'ís at the trial of the assassins. This event established the independence of the Bahá'í Faith from Islam both for the Russian government and for the people of Ashgabat. Under the protection and freedom given by the Russian authorities, the number of Bahá'ís in the community rose to 4,000 (1,000 children) by 1918 and for the first time anywhere in the world a true Bahá'í community was established, with its own hospitals, schools, workshops, newspapers, cemetery, and House of Worship. The city population was between 44 and 50 thousand at this time.
This first Bahá'í House of Worship was constructed inside the city of Ashgabat. The design of the building was started in 1902, and the construction was completed in 1908; it was supervised by Vakílu'd-Dawlih, another Apostle of Bahá'u'lláh. The House of Worship in Ashgabat has been the only Bahá'í House of Worship thus far to have the humanitarian subsidiaries associated with the institution built alongside it.
The city of Merv (also spelled Marv, Mary) had a Bahá'í community, while it was far smaller and less developed. The Bahá'í community in the city received permission to build a House of Worship which they did on a smaller scale.
By the time the effects of the October Revolution began to spread across the Russian Empire transforming it into the Soviet Union, Bahá'ís had spread east through Central Asia and Caucasus, and also north into Moscow, Leningrad, Tbilisi and Kazan with the community of Ashgabat alone numbering about 3000 adults. After the October Revolution the Ashgabat Bahá'í community was progressively severed from the rest of the worldwide Bahá'í community. In 1924 Bahá'ís in Merv had schools and a special committee for the advancement of women. Initially the religion still grew in organization when the election of the regional National Assembly of the Bahá'ís of the Caucasus and Turkistan in 1925.
However, the Bahá'í House of Worship was expropriated by the Soviet authorities in 1928, the Bahá'í schools had been closed in 1930, and the House of Worship was leased back to the Bahá'ís until 1938 when it was fully secularized by the communist government and turned into an art gallery. The records of events shows an increasing hostility to the Bahá'is between 1928 and 1938. From 1928 free rent was set for five years, and the Bahá'ís were asked to make certain repairs, which they did. But in 1933, before the five-year rent agreement expired the government suddenly decided expensive renovations would be required. These unexpected requirements were accomplished, but in 1934 complaints about the condition of the building were again laid. Inquires from abroad silenced the complaints. In 1936 escalated demands were made beyond the resources of the local community. The Bahá'ís of Turkistan and the Caucasus rallied and were able to sustain the construction requested. Then the government made moves to confiscate the main gardens of the property to provide for a playground of a school (the school itself being confiscated from the Bahá'ís originally) which would wall off the grounds from the Bahá'ís — leaving only an entrance to the temple through a side entrance rather than the main entrance facing the front of the property. Protests lead to the abandonment of this plan; then in 1938 all pretexts came to an end.