“And We gave Solomon understanding of the case; and to each of them We gave sound judgment and knowledge. And We subjected the mountains and the birds to glorify along with David, and We were the Doer of that.” (79)
His saying—exalted is He—“And We gave Solomon understanding of the case” means: We taught Solomon the matter and inspired him with its judgment. “And to each of them”—that is, David and Solomon—“We gave sound judgment and knowledge.” Al-Hasan said: “Had it not been for this verse, I would have thought that the judges were ruined. Yet Allah commended Solomon for reaching the right judgment and praised David for his exertion in legal reasoning.” (1)
The scholars differed over whether David’s judgment was based on legal reasoning or on a revealed text; the same applies to Solomon’s judgment.
Some of them said: Both acted on the basis of legal reasoning. They held that legal reasoning is permissible for the prophets so that they may attain the reward of those who exercise legal reasoning, except that David erred while Solomon was correct. They also said: Error is possible for the prophets, but they are not left confirmed upon it. As for the scholars, they may exercise legal reasoning concerning new cases when they find no explicit text from the Quran or sunnah regarding them. If they err, there is no sin upon them (2) [for it has been lifted from them], (3) as related to us by Abd al-Wahhab ibn Muhammad ⦗18b⦘ al-Khatib, who said: Abd al-Aziz ibn Ahmad al-Khallal related to us; Abu al-Abbas al-Asamm related to us; al-Rabi ibn Sulayman related to us; al-Shafii related to us; Abd al-Aziz ibn Muhammad related to us, from Yazid ibn Abd Allah ibn al-Hadi, from Muhammad ibn Ibrahim al-Taymi, from Bishr
(1) See al-Qurtubi, 11:309.
(2) For a detailed discussion, see Tafsir al-Qurtubi, 11:308-310; and Adwa al-Bayan, 4:596-597. Al-Shanqiti, may Allah have mercy on him, held that the judgment of David and Solomon, peace be upon them, was based on ijtihad (independent legal reasoning), not revelation. He states: “The verse contains two indications that their judgment was based on ijtihad rather than revelation: Solomon was correct and thus deserved praise for his ijtihad and correctness, whereas David was not correct, yet deserved praise for his ijtihad and incurred neither blame nor censure for not reaching the correct conclusion. Allah praised Solomon for being correct in His saying, fa-fahhamnaha Sulayman (So We gave Solomon the understanding of it), and praised them both in His saying, wa kullan atayna hukman wa ilma (And to each of them We gave judgment and knowledge). His saying, idh yahkumani (when they were judging), shows that they both judged the case, each with a ruling different from that of the other. Had it been revelation, such disagreement would not have been permissible. He then says, fa-fahhamnaha Sulayman, which shows that David was not given its understanding. Had his ruling in the matter been based on revelation, he too would have been given its understanding, as is clear. Thus, His saying, idh yahkumani, together with fa-fahhamnaha Sulayman, indicates that the judgment was not based on revelation but on ijtihad; Solomon, rather than David, was correct in it because Allah enabled him to understand it.
“The second indication is that Allah's saying, fa-fahhamnaha (So We gave him understanding of it), shows that He enabled him to derive it from the revealed legal texts already available to them, rather than sending down to him a new revelation that abrogated the previous ruling. The expression fa-fahhamnaha is more fitting for the former meaning than for the latter, as is evident.”
(3) Added from manuscript B.