Azerbaijan is ay Muslim - majority country. Estimates include 96.9% (CIA), 93.4% (Berkley Center, 2012), 99.2% (Pew Research Center, 2009) of the population being nominally as Muslim. Most are adherents of Shia branch (approximately 85% Shi'a according to Berkley Center, 2012); with a minority (15%) being Sunni Muslim, differences traditionally have not been defined sharply. Most Shi'a are adherents of orthodox Ithna Ashari school of Shi'a Islam. Following many decades of Soviet atheist policy, religious affiliation is nominal in Azerbaijan and Muslim identity tends to be based more on culture and ethnicity than religion. Traditionally villages around Baku and Lenkoran region are considered stronghold of Shi'ism. In some northern regions, populated by Dagestani (Lezghian) people, Sunni Islam is dominant. Folk Islam is widely practiced but there is little evidence of an organized Sufi movement.
The rest of the population adheres to other faiths or are non-religious, although they are not officially represented. Other traditional religions or beliefs that are followed by many in the country are the Armenian Apostolic Church (in Nagorno-Karabakh), the Russian Orthodox Church, and various other Christian denominations.
Like all other post-Soviet states formerly ruled by the Soviet Union, Azerbaijan is a secular state; article 48 of its Constitution ensures the liberty of worship, to choose any faith, or to not practice any religion, and to express one's view on the religion. The law of the Republic of Azerbaijan (1992) "On freedom of faith" ensures the right of any human being to determine and express his view on religion and to execute this right. However, a 1996 law states that foreigners have freedom of conscience, but are denied the right to "carry out religious propaganda", i.e., to preach, under the threat of fines or deportation. According to paragraphs 1-3 of Article 18 of the Constitution the religion acts separately from the government, each religion is equal before the law and the propaganda of religions, abating human personality and contradicting to the principles of humanism is prohibited. At the same time the state system of education is also secular.
The Bahá'í Faith in Azerbaijan crosses a complex history of regional changes. Before 1850, followers of the predecessor religion Bábism were established in Nakhichevan. By the early 20th century, the Bahá'í community, now centered in Baku, numbered perhaps 2000 individuals and several Bahá'í Local Spiritual Assemblies had facilitated the favorable attention of local and regional, and international leaders of thought as well as long standing leading figures in the religion. However under Soviet rule the Bahá'í community was almost ended though it was immediately reactivated as perestroika loosened controls on religions and re-elected its own National Spiritual Assembly in 1992. The modern Bahá'í population of Azerbaijan, centered in Baku, may have regained its peak from the oppression of the Soviet period of about 2000 people, today with more than 80% converts although the community in Nakhichevan, where it all began, is still seriously harassed and oppressed.
The Christian religion began to be spread in Azerbaijan by means of the Caucasus Albania in the first years of the new era in times of Christ's apostils.Christianity is represented by Orthodoxy, Catholicism and Protestantism as well as a number of minority communities in Azerbaijan.
Christians, who are estimated to number between 280,000-450,000 (3.1%-4.8%) are mostly Russian and Georgian Orthodox and Armenian Apostolic (almost all Armenians live in the break-away region of Nagorno-Karabakh). There is also a small ethnic Azerbaijani Protestant community, numbering around 5,000, mostly from Muslim backgrounds.
Azerbaijan also has eleven Molokan communities related to the old rituals of Orthodoxy. These communities do not have any church; their dogmas are fixed in a special book of rituals. They oppose the church hierarchy which has a special power.
Saint Gregory the Illuminator Church (Azerbaijani: Müq?dd?s Qriqori kils?si, Armenian: ????? ?????? ??????????? ???????) was built in 1871. In 1869 Baku military governor Mikhail Petrovich Kolyubakin alloted land for the building of the church.The building was designed by Carl Gippius, brother of famous artist Otto Gustavovich Gippius (Yevstafiyevich) and architect of Baku city and the governorate. Carl Gippius`s first work was the St Charles Church in Tallinn and second was Saint Gregory the Illuminator Church in Baku.He dedicated most of his life to construction of churches. In 1903 a library and school were built in the courtyard of the church. It survived through the Soviet state atheist policies of the 1920s and 1930s when all but one Armenian church in Baku were destroyed. In 2002 the church was transferred to the Presidential Library, which is located nearby, and now houses its archive. 
The Udis who resided on the territory of the Caspian sea shore, later accepted Christianity and spread this religion in the Caucasus Albania. The church of Kish (the Kish village of Shaki district) is one of the major examples of this cultural heritage.
There is a tiny Catholic community in Baku and surroundings, with less than a thousand members.
The Vatican Foreign Minister Giovanni Lajolo visited Baku May 19, 2006. During the visit to last till May 25, he met with President Ilham Aliyev and chairman of the Caucasus Clerical Office, Sheikh Allahshukur Pashazada to discuss ties between Azerbaijan and the Vatican.
Giovanni Lajolo made the following statements: "We are satisfied with the level of friendly communications between Azerbaijan and Vatican". "Azerbaijan really is a place of merge of religions and cultures. We highly estimate tolerance existing here. And we are very glad with intensive development of Azerbaijan. Vatican is interested in expansion of relations with Azerbaijan, and the purpose of my visit to Baku consists in carrying out of exchange by opinions on the further development of our ties."
Baku's Catholic church was demolished in the Stalin era but a new one, started in September 2005, was opened in summer 2007.
Zoroastrianism in Azerbaijan has been tied not to survival of the ancient religion in the area, but a more recent arrival of the Parsi Zoroastrians coming from the British India, such as from Sindh and the Punjabi city of Multan at the time of the discovery of oil in Baku and the need for expert labor in the 1880s. Fire Temple of Baku was constructed for their use at the site of an ancient fire temple utilizing the naturally burning gas and oil on the ground. The structure a chartaqi is a standard fire temple of the Zoroastrians for thousands of years.
Until recently Islam in Azerbaijan was relatively low key. Although the vast majority of Azerbaijanis identified themselves as Muslims, surveys in the late Soviet and early post-Soviet era generally found that less than a quarter of those who considered themselves Muslims "had even a basic understanding of the pillars of Islam", according to researchers Emil Souleimanov and Maya Ehrmann. According to a survey conducted in 2000, fewer than 7 percent of respondents considered themselves "firm believers," while just 18 percent confessed observance of salat (ritual prayer, one of the pillars of Islam). Thus, for many Azerbaijanis, Islam tended toward a more ethnic/nationalistic identity than a purely religious one.
An estimated four fifths of Muslims in Azerbaijan are Shi'as of the Twelver branch. The remainder are Sunnis belonging to the Hanafi branch and inhabit primarily the northern and western areas of the republic.Folk Islam is widely practiced but there is little evidence of an organized Sufi movement.
After the collapse of the Soviet Union all religious organizations fell into depression and split into pieces while the Religious Organization of Transcaucasia Muslims headed by akhund Allahshukur Pashazade elected the Sheikh ul-Islam in 1980 intensified its operation and tried to spread its influence to the entire Caucasus under the name of the Caucasus Muslims Department. The measures to implement these attempts were undertaken at the tenth session of the Caucasus Muslims held in Baku in 1998. The opening of CMD representations in Georgia and Dagestan was one of the significant steps in this field.
The chair of CMD ensures the consequent contacts with Islamic organizations and manages to establish close religious relations with neighbor Muslim countries. To date CMD fulfills the religious needs of the Islamic communities of Azerbaijan, oversees the proper fulfillment of the rituals (in accordance with Sharia), progresses in training religious workers through the Islamic University of Baku, founded in 1991 and is responsible for all religious events occurring in the country. The faculty of theology of the State University of Baku has been training Islam and theology scientists since 1992.
Through the years of independence the worshipping of holies strengthened in Azerbaijan and the new holy places were set up along with old ones. Bakhailism created its own assembly and expanded yearly.
The relations of the state-religion are regulated by the State Committee for the Work with Religious Associations of Azerbaijan established by the decree of President Heydar Aliyev in 2001.
More recently, some Azerbaijani youths have been drawn increasingly to Islam. Additionally, some young women in Azerbaijan have decided to dress in Islamic attire despite the risks associated including being rebuked by university personnel for wearing the hijab.
There are three separate communities of Jews (Mountain Jews, Ashkenazi Jews, and Georgian Jews) in Azerbaijan, who total almost 16,000 combined. Of them, 11,000 are Mountain Jews, with concentrations of 6,000 in Baku and 4,000 in Quba, 4,300 are Ashkenazi Jews, most of whom live in Baku and Sumqayit, and 700 are Georgian Jews. There are three synagogues in Baku and a few in the provinces. Sheikh-ul-Islam Allahshukur Pashazade has donated US$40,000 for construction of Jewish House in Baku in 2000.
Very little is known about pre-Christian and pre-Islam Azerbaijani mythology; sources are mostly Hellenic historians like Strabo and based on archeological evidence. Strabo names the gods of the sun, the sky, and above all, the moon.
The history of Zoroastrianism in Azerbaijan goes back to the first millennium BC. Together with the other territories of the Persian Empire, Azerbaijan remained a predominantly Zoroastrian state until the Arab invasion in the 7th century. The name Azerbaijan means the "Land of The Eternal Fire" in Middle Persian, a name that is said to have a direct link with Zoroastrianism. Today the religion, culture, and traditions of Zoroastrianism remains highly respected in Azerbaijan, and Novruz continues to be the main holiday in the country. Zoroastrianism has left a deep mark in the history of Azerbaijan. Traces of the religion are still visible in Ramana, Khinalyg, and Yanar Dag.
The constitution of Azerbaijan provides for freedom of religion, and the law does not allow religious activities to be interfered with unless they endanger public order. Cases of anti-Semitism in Azerbaijan are rare.
The 2004 U.S. Department of State report on Human Rights in Azerbaijan noted some instances in which freedom of religion was violated, such as interference with the Juma Mosque due to the political activism of its Imam. All religious organizations are required to register with the government, and groups such as Baptists, Jehovah's Witnesses, and members of the Assemblies of God continue to be denied religious registration. The official web site of Jehovah's Witnesses has documented a number of acts of religious intolerance being committed by the Azerbaijan government against members of Jehovah's Witnesses.
The position of the governmental authorities towards Islam is controversial. Men who grow beards more than normal are often viewed with suspicion by the authorities, for fear of the propagation of Wahhabism. Despite the government's denial of the matter, the Azerbaijani police drew criticism from lawyers for infringing the rights of observant Muslims.
However the 2009 Religion Law requires the compulsory re-registration of all religious groups. The overwhelming majority of religious groups that have been granted re-registration are Muslim. Hundreds of others are still waiting to hear from the authorities.