The Safavids came to power after they filled a power vacuum after the demise of the Turko Mongolian Tamarind Dynasty in 1506. They were Shia, and they used their belief systems to maintain power. This is why 95% of people in the Safavids were Shia. Because of their belief, they mainly clashed with empires who were Sunni, such as the Ottoman Empire and some of the Sunni people in the Mughal Empire.