During the early part of his reign, Akbar adopted an attitude of suppression towards Muslim sects that were condemned by the orthodoxy as heretical.
In 1567, on the advice of Shaikh Abdu'n Nabi, he ordered the exhumation of Mir Murtaza Sharifi Shirazi – a Shia buried in Delhi – because of the grave's proximity to that of Amir Khusrau, arguing that a "heretic" could not be buried so close to the grave of a Sunni saint, reflecting a restrictive attitude towards the Shia, which continued to persist until the early 1570s.
He suppressed Mahdavism in 1573 during his campaign in Gujarat, in the course of which the Mahdavi leader Bandagi Miyan Sheik Mustafa was arrested and brought in chains to the court for debate and released after eighteen months.
However, as Akbar increasingly came under the influence of pantheistic Sufi mysticism from the early 1570s, it caused a great shift in his outlook and culminated in his shift from orthodox Islam as traditionally professed, in favour of a new concept of Islam transcending the limits of religion.
Consequently, during the latter half of his reign, he adopted a policy of tolerance towards the Shias and declared a prohibition on Shia-Sunni conflict, and the empire remained neutral in matters of internal sectarian conflict.
In the year 1578, the Mughal Emperor Akbar famously referred to himself as:
Emperor of Islam, Emir of the Faithful, Shadow of God on earth, Abul Fath Jalal-ud-din Muhammad Akbar Badshah Ghazi (whose empire Allah perpetuate), is a most just, most wise, and a most God-fearing ruler.

In 1580, a rebellion broke out in the eastern part of Akbar's empire, and a number of fatwas, declaring Akbar to be a heretic, were issued by Qazis.
Akbar suppressed the rebellion and handed out severe punishments to the Qazis.
To further strengthen his position in dealing with the Qazis, Akbar issued a mazhar, or declaration, that was signed by all major ulemas in 1579.
The mahzar asserted that Akbar was the Khalifa of the age, a higher rank than that of a Mujtahid: in case of a difference of opinion among the Mujtahids, Akbar could select any one opinion and could also issue decrees that did not go against the nass.
Given the prevailing Islamic sectarian conflicts in various parts of the country at that time, it is believed that the Mazhar helped stabilize the religious situation in the empire.
It made Akbar very powerful because of the complete supremacy accorded to the Khalifa by Islam, and also helped him eliminate the religious and political influence of the Ottoman Khalifa over his subjects, thus ensuring their complete loyalty to him.

Throughout his reign Akbar was a patron of influential Muslim scholars such as Mir Ahmed Nasrallah Thattvi and Tahir Muhammad Thattvi.

Whenever Akbar would attend congregations at a mosque the following proclamation was made:
The Lord to me the Kingdom gave, He made me wise, strong and brave, He guides me through right and truth, Filling my mind with the love of truth, No praise of man could sum his state, Allah Hu Akbar, God is Great.
During the early part of his reign, Akbar adopted an attitude of suppression towards Muslim sects that were condemned by the orthodoxy as heretical. In 1567, on the advice of Shaikh Abdu'n Nabi, he ordered the exhumation of Mir Murtaza Sharifi Shirazi – a Shia buried in Delhi – because of the grave's proximity to that of Amir Khusrau, arguing that a "heretic" could not be buried so close to the grave of a Sunni saint, reflecting a restrictive attitude towards the Shia, which continued to persist until the early 1570s. He suppressed Mahdavism in 1573 during his campaign in Gujarat, in the course of which the Mahdavi leader Bandagi Miyan Sheik Mustafa was arrested and brought in chains to the court for debate and released after eighteen months. However, as Akbar increasingly came under the influence of pantheistic Sufi mysticism from the early 1570s, it caused a great shift in his outlook and culminated in his shift from orthodox Islam as traditionally professed, in favour of a new concept of Islam transcending the limits of religion. Consequently, during the latter half of his reign, he adopted a policy of tolerance towards the Shias and declared a prohibition on Shia-Sunni conflict, and the empire remained neutral in matters of internal sectarian conflict. In the year 1578, the Mughal Emperor Akbar famously referred to himself as:
Emperor of Islam, Emir of the Faithful, Shadow of God on earth, Abul Fath Jalal-ud-din Muhammad Akbar Badshah Ghazi (whose empire Allah perpetuate), is a most just, most wise, and a most God-fearing ruler.
In 1580, a rebellion broke out in the eastern part of Akbar's empire, and a number of fatwas, declaring Akbar to be a heretic, were issued by Qazis. Akbar suppressed the rebellion and handed out severe punishments to the Qazis. To further strengthen his position in dealing with the Qazis, Akbar issued a mazhar, or declaration, that was signed by all major ulemas in 1579. The mahzar asserted that Akbar was the Khalifa of the age, a higher rank than that of a Mujtahid: in case of a difference of opinion among the Mujtahids, Akbar could select any one opinion and could also issue decrees that did not go against the nass. Given the prevailing Islamic sectarian conflicts in various parts of the country at that time, it is believed that the Mazhar helped stabilize the religious situation in the empire. It made Akbar very powerful because of the complete supremacy accorded to the Khalifa by Islam, and also helped him eliminate the religious and political influence of the Ottoman Khalifa over his subjects, thus ensuring their complete loyalty to him.
Throughout his reign Akbar was a patron of influential Muslim scholars such as Mir Ahmed Nasrallah Thattvi and Tahir Muhammad Thattvi.
Whenever Akbar would attend congregations at a mosque the following proclamation was made:
The Lord to me the Kingdom gave, He made me wise, strong and brave, He guides me through right and truth, Filling my mind with the love of truth, No praise of man could sum his state, Allah Hu Akbar, God is Great.
Akbar