O People, a teaching from your Lord has come to you, a healing for what is in [your] hearts, and guidance and mercy for the believers. Say to them (O Prophet), ‘In God’s grace (faḍl) and mercy (raḥma) let them rejoice: these are better than all they accumulate’ (Q. 10:57-8).   

The verses above teach us that the sharīʿa of Islam is an expression of God’s mercy and grace. In this post we will look at some aspects of how this is so, so that we can better understand and appreciate the nature of the sharīʿa. As we will see, the sharīʿa is merciful in the way it deals with us, allowing us a degree of flexibility and choice in fulfilling its commands, and it also teaches us to deal with others with similar mercy and grace. Let us look first at some of the ways it teaches us the importance of acting with mercy and grace toward others, before we come back to how the sharīʿa itself acts with mercy and grace toward us, and finally concluding with a verse of the Qur’an that beautifully encapsulates both.

Mercy and Grace in the Judgement of Solomon

God recounts to us in the Qur’an, in the chapter of The Prophets (al-Anbiyāʾ Q. 21), the story of a farmer and a shepherd who came to the Prophet David (peace be upon him) to judge between them. The shepherd’s flock of sheep strayed in the night into the farmer’s farm and consumed his produce:

And David and Solomon, when they gave judgement regarding the field into which sheep strayed by night and grazed. We witnessed their judgement… (Q. 21:78).

For David, the judgment was simple and straightforward: the shepherd had to compensate for the damage caused by the flock that he was responsible for. The shepherd did not have the necessary funds, but David found that the value of the damaged crops was roughly equivalent to the value of the sheep themselves, so he ordered the shepherd to give all his sheep to the farmer in compensation. After the litigants left, they chanced upon David’s son Solomon (peace be upon him), who, upon hearing of his father’s judgement, said, ‘I would have ruled differently.’ He took them both back to his father who asked, ‘How would you have ruled instead?’ Solomon said that, while taking the sheep away from the shepherd was the natural course of justice, it would leave him financially destroyed and with no means to make a living. A better way was to have the shepherd lend his sheep to the farmer, so that the farmer could benefit from their milk, wool and offspring, and thus continue to make a living and profit as he would have from his crop. Meanwhile, the shepherd would take charge of the farm to replant the crop and bring it back to its original state; as he did so, the farm would continue to give him a means of subsistence. Once the farm was returned to its original state, the shepherd would give the farm back to the farmer, and the farmer would give the sheep back to the shepherd. David was impressed with his son’s judgement.[i] The Qur’an continues to say:

We made Solomon understand the case (better), though we gave sound judgement and knowledge to both of them (Q. 21:79).

Most jurisprudents believed that this was a case of ijtihād by these two prophets, in which one prophet was guided to the correct answer, and was therefore rewarded doubly, one reward for his effort and one for hitting the mark, while the other prophet gave the incorrect answer, but was still rewarded for his effort (and as a prophet, he was soon shown the correct answer by God via his son’s judgement, because a prophet cannot err and be left uncorrected). They say that David, despite his mistake, was never chastised by God, rather he was praised as having been given ‘sound judgement and knowledge’ in his previous judgements, just not in this one.

Other jurisprudents disagreed. They held that prophets cannot err in judgement. It may be, however, that there could be more than one possible solution or judgement to a single case, and sometimes God’s prophets and messengers were not guided to God’s preferred solution and missed what God wanted them to do, until God would later show them the best course.[ii] There are similar examples from the life of God’s final messenger, Muhammad (ﷺ) like the case of how to deal with the prisoners of Badr, for example.[iii] So just because Solomon’s judgement was better in this case does not mean that David’s judgement was wrong. In fact it was absolutely correct, because it was to give financial compensation for the damages caused by one’s flock, as per the teachings also of the final sharīʿa of God’s Messenger Muhammad (ﷺ), and that is what justice requires.[iv] God Himself wanted to make this clear when He concluded the verse by saying, ‘though we gave sound judgement and knowledge to both of them.’ This means that God was referring to the judgements of both David and Solomon as being of sound judgement and knowledge of God’s teachings. It is not that God was praising David for his previous judgements as the other scholars had contended.

In fact, if we look at the beginning of the story in the Qur’an, it begins with, ‘And David and Solomon when they gave judgement…’. This ‘and’ means ‘and also David and Solomon.’ But what is also the case about David and Solomon? According to the great Qur’an commentator Ibn ʿAṭiyya (d. 542/1147), ‘And (also)’ here refers to the previous verse that says, ‘And Lot (also) we gave sound judgement and knowledge’ (Q. 21:74), which in turn connects back to the much earlier, ‘Long ago We bestowed right guidance upon Abraham’ (Q. 21:51). So this chapter of the Qur’an – which is teaching us about the nature of God’s prophets – is saying: ‘Long ago We bestowed right guidance upon Abraham….and Lot also We gave sound judgement and knowledge…and Noah also (We gave the same) … and David and Solomon also (we gave sound judgement and knowledge) when they gave judgement regarding the field…’[v] According to the great commentator Ibn ʿĀshūr (d. 1973), the verse starts this way to tell us that during their very judgements in this case they were being granted sound judgement and knowledge. The verse then concludes by explicitly repeating what was referenced in the beginning by saying, ‘We made Solomon understand it [better], though We gave sound judgement and knowledge to both.’ This was to drive away the possible misunderstanding that David’s judgement was incorrect or unjust, and to emphasise that Solomon’s judgement was simply better.[vi]

If the rulings of both David and Solomon were correct, Solomon’s ruling was better because it was more lenient upon the shepherd and protected him from financial ruin, while leaving both parties content. David’s judgement was correct because it was exactly what justice demanded: the shepherd had made a mistake and paid compensation for the damages. But through his wisdom Solomon was able to uphold justice while remaining merciful and lenient with both parties. No one is harmed for the sake of justice, not even the one whose negligence caused harm to another. As I have written in my recent book Sufis and Sharīʿa: The Forgotten School of Mercy, this story shows that the sharīʿa did not only aim to deliver dry justice, because the sharīʿa’s justice is part of its wider function as a source of mercy, benefit and blessings for all mankind.[vii]

Mercy and Grace in The Judgements of Muhammad (ﷺ)

As Ibn ʿĀshūr notes with regard to the judgement of Solomon, had the farmer not been a fair person, he could have rejected Solomon’s judgement and insisted on simply getting his due compensation and taking the shepherd’s sheep as per David’s judgement, because Solomon’s decision to find a more compassionate and merciful solution was not binding upon both parties except with the approval of both parties, being more similar to the parties reaching an amicable settlement instead of insisting on adjudication. As for the bare minimum solution of plain justice as per David’s ruling, that would have been binding.[viii] As I have also noted in my book, Muslim judges traditionally acted as arbiters, more like wise village elders seeking to create peace, harmony, and rapprochement between parties, and attempting to find solutions that were pleasing to both parties, instead of simply enforcing dry or harsh justice. They therefore had leeway in their judgements and did not necessarily follow the legal rulings as laid out in fiqh which deal with right and wrong.[ix] Many of the judgements and instructions of God’s Messenger (ﷺ) should also be interpreted in the same light.

For example, Ibn ʿĀshūr compares the judgements of David and Solomon to those of God’s Messenger Muhammad (ﷺ) with regard to the watering of the land of the Companion al-Zubayr and the land of his neighbour. Al-Zubayr possessed a piece of land on a hill under a spring. When the water passed through his land, he would hold it until it watered his trees, before releasing it to go to the land of the plot that was under his. This was the solution that God’s Messenger had recommended to Medina’s inhabitants: those nearer the water source had the right to stop the water while it filled up the water trenches around the bases of their trees, and then had to release it downstream towards the next plot of land, and so on. Al-Zubayr’s neighbour was not happy at all with al-Zubayr blocking the water’s flow, and complained to God’s Messenger (ﷺ). God’s Messenger (ﷺ) knew that al-Zubayr was a noble and magnanimous Companion who was willing to give up part of his right to make another person happy, so he asked him to block the water for a shorter period of time, and then let it carry on to the next plot without having filled the trenches around the tree trunks completely. Al-Zubayr’s neighbour was still not happy with this judgement and insinuated that God’s Messenger (ﷺ) was being partial to al-Zubayr! In response to this man not only rejecting the favourable judgement of God’s Messenger (ﷺ) but also impugning it, God’s Messenger then ruled that al-Zubayr should partake of his full right, and block the water for longer before releasing it. God’s Messenger (ﷺ) therefore started with the ruling that was lighter and more compassionate, but involved the magnanimity of one party for the sake of another, as was the case with Solomon’s judgement. When al-Zubayr’s neighbour showed bad etiquette and rejected even that, God’s Messenger ruled according to the dictates of justice and gave al-Zubayr his full due, as per David’s ruling.

Another teaching of magnanimity directed at Medina’s inhabitants was that one should not prevent their next-door neighbour from making use of the wall of their house, such as to let them install a piece of wood that might bring water to their house, if that would bring benefit to the neighbour without harming one’s own home or person. According to Imām Mālik (d. 179/795), this hadith, the authenticity of which is agreed upon, is not a binding ruling that Islamic judges have to enforce. This is rather a recommendation for people to act with kindness to their neighbours. He argued that, in the end, a person was entitled to refuse to let their neighbour install some woodwork on their house wall, and would not be sinning in doing so, nor should a judge force them to allow it. This instruction from God’s Messenger was an instruction urging Muslims to act with graciousness towards their neighbours rather than insisting on their rights.[x]

The Qur’anic Pairing of Justice and Grace

We could say, as I have said in my book, that these rulings of Muhammad, David and Solomon (peace be upon them all) remind us of the Qur’anic pairing of Divine Justice (ʿadl) with Divine Favour/Grace (faḍl). In both cases, one ruling represents justice, while the other represents favour or graciousness. The Qur’an recommends acting upon the latter. A clear example can be found where the Qur’an explains the procedure for divorce when a man has given his bride a dowry but then decides to divorce her before consummating his marriage. In this case, the groom is entitled to request that half the dower be returned to him (whereas if the marriage had been consummated then he can ask for nothing back). This represents justice. However, the Qur’an then encourages the parties to act with graciousness and to be willing to forgo their right. For example, the groom could say that he does not want his half of the dower returned, and that the bride may keep the whole amount. Or the bride may say that, since the marriage was not consummated, she would be happy to return the whole dower to the groom. Then the Qur’an addresses not just them but all the believers and says, ‘And forgoing one’s right is closer to piety (taqwā). Do not forget graciousness (faḍl) in dealing with each other’ (Q. 2.237). The Qur’an is therefore encouraging us to be gracious and magnanimous in dealing with each other, rather than always demanding our strict rights.

Another application appears in the context of financial loans, where the Qur’an says, ‘If [the debtor] is in difficulty, grant him a delay until a time of ease…’ (Q. 2:280).  This, as Ibn Taymiyya (d. 728/1328) wrote, is an obligatory teaching of justice, and whoever does not act upon it is liable for God’s punishment in this world and the next. ‘It would be for your own good – if you but knew it – to write off the debt entirely as an act of charity’ (Q. 2:280). This, wrote Ibn Taymiyya, is a recommended act of grace. Whoever acts upon it will be rewarded and raised in rank, but whoever leaves it deserves no punishment.[xi]

‘If anyone kills a believer by mistake, he must free one Muslim slave and pay compensation to the victim’s relatives….’ This is justice. ‘Unless [the relatives] forgo the compensation’ (Q. 4:72). This is grace.

‘In the Torah We prescribed for them a life for a life, an eye for an eye, a nose for a nose, an ear for an ear, a tooth for a tooth, an equal wound for a wound.’ This is justice. ‘If anyone forgoes this out of charity, it will serve as atonement for his bad deeds’ (Q. 5.45). This is grace.

In the context of the tyranny of oppressors, the Qur’an praises those who defend themselves, and teaches that while ‘the recompense for a crime shall be its equivalent,’  – justice – , those who, having defended themselves, instead ‘forgive and make amends will be rewarded by God’ – grace – (see Q. 42:39-43).

Similarly, as I have shown in my book, the great scholar al-Ṣuyūṭī (d. 911/1505) wrote that Jewish law only allowed one way of dealing with murder, which was capital punishment, whereas Christian law (at least according to one interpretation) prohibited it and allowed the payment of blood money instead. Islam, on the other hand, gave the victim’s family a choice between the two: they could insist on capital punishment or they could act with ʿafw (pardon). The Muhammadan sharīʿa was therefore more flexible as it combined the two previous sharīʿas within it. Ibn Taymiyya had also dealt with this before al-Ṣuyūṭī in a more nuanced and accurate discussion. He said,

We do not deny that, as with our sharīʿa, Moses (peace be upon him) commanded justice while recommending grace, and so did Jesus (peace be upon him). To claim that Jesus made graciousness obligatory and did not allow the oppressed to have his oppressor punished, and that Moses on the other hand did not recommend graciousness, is to find fault in the sharīʿas of God’s Messengers. What we can say, however, is that the Torah mentions justice more, the Bible mentions grace more, and the Qur’an combines them both in the most perfect way.[xii]

Flexibility and Choice in the Sharīʿa

Now let us return to the story of David and Solomon. Some scholars were troubled by the fact that David and Solomon reached two different conclusions, believing that there could only be one correct answer while also holding that prophets cannot make mistakes. Their solution was to say that God inspired David with the first judgement, and then inspired Solomon with the second judgement to abrogate the first. This is the most extreme case I have come across of this tendency of scholars to resort to abrogation as a way to solve seemingly different judgements found in the Qur’an or Hadith. Whenever they are faced with seemingly contradictory teachings in the Qur’an or Sunna, their easy answer is that God and His Messenger must have taught things one way at first and then abrogated them with a second final way. But other scholars resisted the constant recourse to this explanation, which in the case of David and Solomon’s story would reach extreme and, dare I say comical, proportions (God sending down one ruling and then sending down another to repeal it within the same hour). Instead, these scholars showed that the Qur’an and Sunna are full of examples in which the sharīʿa comes with an inbuilt flexibility, giving Muslims the choice in how to discharge their duties, some examples of which I discuss in my book.

Al-Ṣuyūṭī argued that this flexibility could also explain many of the different practices of the Companions and subsequently the schools of law (madhhabs) that traced their varied positions to the practices of the Companions (while many other differences between the schools are of course a case of there being one correct answer and other incorrect ones). As I have shown in Sufis and Sharīʿa, some Sufi jurisprudents, like ʿAbd al-Wahhāb al-Shaʿrānī (d. 973/1565) and Shāh Waliullāh Dihlawī (d. 1762), built on al-Suyūṭī’s idea as well as the statements of many of the early Followers (tābiʿūn) and Imams to argue that this leeway in the sharīʿa of Islam is because it is the final sharīʿa brought by the Seal of the Prophets and Messengers, and therefore it needed to be accommodating to people’s different physical, mental, spiritual and financial abilities. They rooted this understanding of the sharīʿa in their belief in God’s immense mercy and their belief that the sharīʿa was a reflection of this divine mercy and of God’s immense grace upon us.

Based on the previous discussions we could add to the ideas of those Sufis that some of the options provided in the sharīʿa are there not to account for people’s different needs and circumstances, but to remind the Muslims about the two paths of justice and grace: teaching them how to right wrongs and how to forgive and make amends, how to seek one’s full right and how to act graciously and magnanimously to others. See for example the Qur’an’s instructions on atoning for the sin of breaking an oath (Q. 5.89):

God does not take you [to task] for what is thoughtless in your oaths, only for your binding oaths: the atonement for breaking an oath is to feed ten poor people with food equivalent to what you would normally give your own families, or to clothe them, or to set free a slave – if a person cannot find the means, he should fast for three days. This is the atonement for breaking your oaths – keep your oaths.

It gives two different types of flexibility. The first flexibility is based on ability: the wrongdoer must first perform a good deed to help others, with three possible options. Here they atone for their sins and purify their souls by helping others. Only if they are unable to perform any of these good deeds, then they are allowed to fast for three consecutive days, which is beneficial to the wrongdoer and does not extend to others. The second type of flexibility is the choice of three good deeds towards others. Here the Qur’an begins with the easiest option first: the wrongdoer must feed ten needy people with food equivalent to what they would normally give their own families. The Qur’an then gives two other options, not in case one is unable to do the first, but encouraging the person to do even better: instead of feeding ten needy people, one could do better and buy them clothes; or even better yet, one could set a slave free.

This verse encapsulates both types of flexibility provided by the Qur’an: one is a reflection of God’s mercy and grace upon the believers, and accounts for their weaknesses and different levels of abilities to perform good, and the second is God’s encouragement for us to act with grace and help others more than the bare minimum needed to purify our own souls. Just as the leeway and flexibility of the sharīʿa is a reflection of God’s grace and mercy upon us, so does it teach us to also deal with others not solely with justice but with mercy and grace.

Sufis and Sharīʿa: The Forgotten School of Mercy is available in hardcover from Edinburgh University Press. The softcover print will be released in 2024. Dr Samer Dajani’s book was the best-selling title in Islamic & Middle Eastern Studies for Edinburgh University Press in 2023. Dr Dajani worked on the book while he was a Research Fellow at the Cambridge Muslim College in 2015-16.

Can’t wait? Read the book’s Explainer now.

[i] This explanation is agreed upon by the commentators. It comes from two Companions: Ibn ʿAbbās and Ibn Masʿūd, and after them a great number of Followers from the different centres of knowledge. See: Al-Ṭabarī, Ibn Jarīr, Jāmiʿ al-bayān ʿan taʾwīl āy al-Qurʾān, ed. ʿAbdullāh al-Turkī, 26 vols (Cairo: Dār Hajar, 2001), 16:322-328.

[ii] This is discussed in books of jurisprudence (uṣūl al-fiqh), in the chapter on ijtihād, in the section on: Is Every Mujtahid Correct? For a clarification of the nature of this debate, see Samer Dajani, Sufis and Sharīʿa: The Forgotten School of Mercy (Edinburgh: Edinburgh University Press, 2013), 343-351.

[iii] See the commentaries on Q. 8:67-68. For example: Ibn ʿĀshūr, al-Taḥrīr wa l-tanwīr, 30 vols (Tunis: al-Dār al-Tūnisiyya, 1984), 10:72-78, also available online at <https://www.altafsir.com/>

[iv] This is at least the ruling according to the Mālikī, Shāfiʿī and Ḥanbalī schools, among others, as supported by this story in the Qur’an (whether according to the judgement of David or Solomon) and as per one hadith. As for the Ḥanafī school, they hold that one is not responsible for damage caused by one’s animals, a ruling they derived from the way they interpreted a different hadith.

[v] Ibn ʿAṭiyya, al-Muḥarrar al-wajīz fī tafsīr al-kitāb al-ʿazīz, 6 vols (Beirut: Dār al-Kutub al-ʿIlmiyya), 4:90. Also available online at < https://www.altafsir.com/>. Most commentators of the Qur’an interpret this to mean, ‘and (remember also) David and Solomon…’ because they saw that their story was being mentioned after that of other Prophets, so they assumed that every story beginning with ‘and’ should be understood to mean ‘and remember also the story of….’.

[vi] Ibn ʿĀshūr, al-Taḥrīr wa l-tanwīr, 17:115; also available online at < https://www.altafsir.com/>.

[vii] Dajani, Sufis and Sharīʿa, 287.

[viii] Ibn ʿĀshūr, al-Taḥrīr wa l-tanwīr, 17:117.

[ix] Dajani, Sufis and Sharīʿa, 72.

[x] Al-Bājī, Abu l-Walīd, al-Muntaqā Sharḥ al-Muwaṭṭaʾ, 7 vols (Cairo: Dār al-Kitāb al-Islāmī, n.d.), 6:43.

[xi] Ibn Taymiyya, al-Jawāb al-ṣaḥīḥ li-man baddala dīn al-masīḥ, 6 vols (Riyadh: Dār al-ʿĀṣima, 1999), 5:59.

[xii] Ibn Taymiyya, al-Jawāb al-ṣaḥīḥ, 5:59.

Dr. Samer Dajani has a BA in Arab & Islamic Civilizations from the American University in Cairo, and an MA and PhD in Islamic Studies from the School of Oriental and African Studies (University of London). He also received an Alimiyya degree from al-Salam Institute (London) and recently completed a postgraduate degree in International Business from Birkbeck University. He was a Research Fellow at Cambridge Muslim College in 2015-16 after which he taught as a lecturer at the Muslim College, London. He is the author of Sufis and Sharia: The Forgotten School of Mercy (Edinburgh University Press, 2023).