Religion in the Nagorno-Karabakh region is characterized by a largely homogeneous Armenian Apostolic population. Prior to the Nagorno-Karabakh conflict a large population of Shia Islamic Azeris also populated the area. While ownership is disputed, most of the region is claimed and governed by the de facto independent Republic of Artsakh.
In the sixteenth century, the first shah of the Safavid Dynasty, Ismail I (r. 1486-1524) established Shia Islam as the state religion. The Safavid Dynasty would have a strict policy of enforcing Shia Islam, which would bring political conflict with the Sunnis of the neighbouring Ottoman Empire.
In 1806, Northern Azerbaijan was annexed by the Russian Empire from the Persian Qajar Dynasty, this region also included Nagorno-Karabakh.
During the Soviet era, state atheism was enforced, which resulted in all of Nagorno-Karabakh's Churches and Mosques being closed.
After the collapse of USSR, the Nagorno-Karabakh War began. During which most of the local Sunni Azeri population was deported by Armenian forces back to Azerbaijan. The Azeri's which had stayed soon after emigrated back to Azerbaijan.