When you read the history of the Rightly-Guided Caliphate looking for the relationship of religion to the world, you come across what are one hundred percent worldly decisions being made that have nothing to do with religion or the Sharī‘a. You also come across situations in which the religious is mixed with the mundane, or the sacred with the political. Perhaps what is worse than this confusion was the exploitation of religion and investment in it for worldly political gains.
AS THIS CONFUSION began to take root, the Rightly-Guided Caliphate descended into non-stop strife – wars with those who opposed zakāh, wars of apostasy, the Great Sedition (al-fitna al-kubrā), the pelting of the Ka‘ba with a catapult, the three-day sacking of the Messenger of Allah’s city in which more than a thousand virgins of the daughters of the Noble Companions were carried off to Karbala, the battle of Ṣiffīn, and Al-Mukhtār’s cultural sedition.
When you examine the history of the four caliphs, you will discover that they were clearly aware of what was political and worldly and what was spiritual and religious, and that in worldly politics they permitted the introduction of the openly infidel systems of diwans, of architectural methods and agricultural systems, because none of this had been part of what the Revelation granted them. They thus made a clear separation in most situations between right and wrong, between ḥalāl and ḥarām, and this awareness of the separation between the two fields was not something they innovated, because they saw observed this in their prophet and in his decision-making, encapsulated in his saying that “You know best the affairs of your world”, and his saying about religion:
Consult your heart. Righteousness is that about which the soul feels at ease and the heart feels tranquil. And wrongdoing is that which wavers in the soul and causes uneasiness in the breast, even though people have repeatedly given their legal opinion on a matter. 
He said this on three occasions, thus nullifying any attempt for a faction to instrumentalist religion and its fatwās as a path to achieving sovereignty and commandeering the Muslim conscience. Even so, they did commandeer Islam and the Muslims right from the earliest periods.
Piety, religiosity and closeness to God and His Messenger were not, for the Prophet, qualifications for political leadership
In his worldly decisions the Prophet would consult experts such as Al-Ḥibāb ibn al-Mundhir at the great Badr event and ordered the appointment of Usāma ibn Zayd to command the Muslim army in its attacks against the Byzantines. Usāma was seventeen years old and the prophet appointed him commander of the army that included Companions such as Abū Bakr and ‘Umar with the rank of soldiers.
The Prophet was making this worldly political decision according to what he deemed right or mistaken and not ḥalāl and ḥarām, because the matter was a political one not a religious one. He therefore prioritised for the leadership those he saw worthy of entrusting the military. If leadership had been based on piety, then he would have entrusted it to one of those to two seniors. Piety, religiosity and closeness to God and His Messenger were therefore not, for the Prophet, qualifications for leadership in political affairs.
Pursuant to this meaning, when we judge the actions of the Orthodox Caliphs, we must distinguish between their commitment to religion, on the ḥalāl and ḥarām, whereas on the administrative and political levels, we never evaluate their acts according to whether they were ḥalāl or ḥarām, but as to whether they were correct or mistaken.
The caliph ‘Umar ibn al-Khaṭṭāb discovered that his agents in the conquered lands were squeezing citizens and looting their lands and wealth in the name of the fay’, jizya or kharāj,  and while the governor was sending the caliph his portion of this looted money, he was keeping for himself the bulk of the fruits of this looting.
‘Umar was employing two tools: religion – what was ḥalāl or ḥarām – and worldly politics – where right and wrong were judged according to mundane interests
Now, if you were in ‘Umar’s place what would you have done? He did not know how many acts of crime or murder had been inflicted upon the Egyptians in the course of collecting this wealth, nor did he know the amount of money sequestered by the governor. He came to know about this excessive extortion late in the day and had to make a decision. ‘Umar did not have the benefit of accounting control mechanisms to manage the collection and its spending, nor were there laws regulating and governing the relationship between the caliph and the local governor, or between the governor and his subjects.
The Caliph immediately wrote to his agents: “You have been consuming what is ḥarām and have been levying what is ḥarām but this ḥarām will burn in your stomachs” and in order to establish justice ‘Umar took half of what they had amassed. That is, he agreed to leave half of the loot to the governor in exchange for the exchequer gaining the other half. ‘Umar was well aware that they were consuming what was ḥarām and that they had thus been levying what was ḥarām, yet he granted them the half of what was ḥarām, and instead of returning this to its rightful owners he put it in the Muslim exchequer, into which ḥarām money was therefore entering and not regularised for years.
So here ‘Umar was employing two tools: religion – that is, what was ḥalāl or ḥarām – and worldly politics – where right and wrong were judged according to mundane interests – interests that invited him to seize money without returning it to its owners, and maintain it by force in the Muslim exchequer – something which according to the Sharī‘a is allowed, and at the same time permissible according to the dictates of politics, whereby the defeated must accept the conditions imposed by the victor and pay the tax for their defeat.
 The Battle of Badr in 624 AD, in which the early Muslim community at Madīna scored a significant victory over the Meccans seeking to avenge the Muslim raids on their caravans.
 Fay’ – spoils, loot; Jizya – a per capita annual tax levied on non-Muslim subjects; Kharāj – a tax on agricultural land and its produce.
Main image: The battle of Ṣiffīn as depicted in a 14th century MSS of Tārīkhnāma-yi Bozorg (‘Great History’)