The following is the translation of an Arabic Q&A from the website of Sheikh Ata' Abu Rashta.
Are all prophets right in their ijtihad or it is only the Mustafa (saw)?
The question arises due to the fact that, Ibn Kathir while explaining Surah Al-Anbiya, Ayah No.(78) quoted Abdullah Ibn Masood and Abdullah Ibn Abbas, who said that the Prophet David (PBUH) gave judgment, between the sheepherder and farm owner whose farm was grazed by the sheep of herder, to give the sheep to the farm owner. Subsequently, his son Solomon (PBUH) told him to change this, O Prophet of Allah! Then he explained the judgment on them in this way: the farm owner will take the sheep to make use of its milk while the sheepherder will cultivate the land as it was in the past i.e. before it was grazed by the sheep and Allah said ففهمناها سليمان (We gave Solomon insight into the case). Does it not mean that the Prophet David (PBUH) used his Ijtihad, which was corrected by the Prophet Solomon (PBUH)?
Answer: All the prophets are infallible in conveying the rules and regulations i.e. they do not transmit rules from their own minds. His being a prophet or messenger obligates that he is infallible in conveying the ahkam of Sharia, i.e. he does not strives by himself in conveying the ahkam of Sharia. Please refer to the "Infallibility (‘ismah) of the Prophets and It is not allowed on the part of the Messenger (SAW) that he be a mujtahid" in the book "Islamic Personality-part 1". So, the prophets in terms of conveying the ahkam of Sharia do not make ijtihad from their own mind, rather through a revelation from Allah (SWT).
Therefore, the judgment made by the prophets Dawood and Sulaiman (May peace be upon them) was a revelation. Moreover, the judgment made by Sulaiman (May peace be upon him) abrogated the judgment given by Dawood ((May peace be upon him), refer to the speech of Allah (SWT)
(وَدَاوُودَ وَسُلَيْمَانَ إِذْ يَحْكُمَانِ فِي الْحَرْثِ إِذْ نَفَشَتْ فِيهِ غَنَمُ الْقَوْمِ وَكُنَّا لِحُكْمِهِمْ شَاهِدِينَ * فَفَهَّمْنَاهَا سُلَيْمَانَ وَكُلًّا آتَيْنَا حُكْمًا وَعِلْمًا وَسَخَّرْنَا مَعَ دَاوُودَ الْجِبَالَ يُسَبِّحْنَ وَالطَّيْرَ وَكُنَّا فَاعِلِينَ).
(And remember David and Solomon, when both gave judgment concerning the field into which some people’s sheep had strayed and grazed by night. We were witness to their judgment. We gave Solomon insight into the case. Yet We gave sound judgment and knowledge to both of them. And We caused the mountains to join David in extolling Our limitless glory, and likewise the birds. We are indeed able to do [all things].
In the words of Allah (SWT) ( فَفَهَّمْنَاهَا سُلَيْمَانَ ) (We gave Solomon insight into the case) is evidence that the judgment of Solomon was a revelation, and as well as His (SWT) speech (كُلًّا آتَيْنَا حُكْمًا وَعِلْمًا) (and We gave sound judgment and knowledge to both of them) is a proof that the judgment by Dawood was also through revelation. Since the judgment made by Solomon came later, so it abrogated the earlier judgment.
For your information, it was stated in some interpretations that both David and Solomon made ijtihad and the judgment of Solomon was more appropriate. Those who expressed this opinion do not deny on the part of prophets and messengers to make ijtihad in conveying the ahkam of Sharia. They say that Allah (SWT) corrects their ijtihad if they make mistake…
6th Muharram 1433 AH.
1st December, 2011 CE.