Akbar the Great was the third and greatest Mughal emperor of India, ruling from 1556 to 1605. He had been brought up as a Sunni Moslem, but was very familiar with Shia Islam and minority sects from his time in exile in Persia when his father had been deposed. Once Akbar inherited the empire, most of his subjects were Hindu, and there were large numbers of Sikhs, Parsis, Jains and Buddhists too.
His ancestors had included Timur and Ghengis Khan, who had carved out empires in the East, both of which were known for religious tolerance, and his own immediate predecessors on the Mughal throne had kept on good terms with their diverse subjects. There is some evidence that Akbar was somewhat intolerant early in his reign, even of different branches of Islam, but as he grew older he seems to have mellowed, possibly under the influence of mystical Sufi teachings.
In 1575, he opened a debating hall called the Ibadat Khana (House of Worship) next to his palace, and invited Sunni clerics, teachers and philosophers to come and discuss religion with him. However, on fine points of theological detail things got so acrimonious that Akbar decided to open up the attendance to try to achieve a broader concensus. Naturally that was doomed to fail.
Nonetheless, he invited representatives of all the major religions and schools of philosophy to come and debate. He even got two Portuguese Jesuits from Goa (outside his realm) to come and explain Christianity, and among the Indian scholars were members of the Charvaka school, an ancient atheist philosophy. Unsurprisingly, nobody could agree on anything at all, leading Akbar to doubt if any set of beliefs could possibly be the whole truth, even his own Moslem faith.
He gave up on the debates in about 1581 and decided to invent his own religion, taking elements of everything he had heard about. He called it Din-i-Ilahi, Divine Faith. It was a mystical religion, without gods or prophets, but respectful of the spiritual aspects of nature. Following the Jains and Charvakas, moderation, tolerance, kindness and abstinence were considered virtues; and the usual suspects like greed and gluttony formed the line-up of deadly sins.
If you were feeling cynical, you might suggest that Akbar was just writing the rulebook to make people docile, easily-governed citizens, but if he’d rigorously enforced any of the existing religions he could have achieved that. After all, it’s what the Roman Emperor Constantine did with Christianity. And, in fact, he didn’t actually “roll out” the new religion to the masses. He became vegetarian himself, but only banned animal slaughter on Jain holy days. The Divine Faith was only ever followed by Akbar’s family and the most senior members of his court, and was forgotten once he died in 1605.
By coincidence, a few days after his death, English Catholics tried to blow up the English Protestant King and his court in the Gunpowder Plot. That was the comparable state of religious tolerance in Western Europe.
[Akbar’s son and successor, Jahangir, was described as an “atheist” by the English ambassador (not unkindly: they were great drinking buddies) but he may have just mistaken a general attitude of tolerance for lack of personal belief.]