But after his demise and the termination of wahy...
But after his demise and the termination of wahy, during the reign of the Caliphs, and subsequently during the Umayyad rule and in the early years of the `Abbasids, the fuqaha' were confronted with new issues and subjects for which they had to find answers. If they could not find the solution by referring to the Book and the Sunnah of the Prophet (S), they had to determine a hukm by consulting other fuqaha'.
As a result of this they either reached a consensus or each one of them arrived at a separate hukm by exercising ijtihadand his own individual judgement.
The View of al-Dawalibi Al-Dawalibi, in his book al-Madkhal ila `ilm usul al-fiqh, states in this connection: "Whenever the of the Prophet (S) faced an impediment in such situations or issues for which they could not find an express decree in the Book and the Sunnah, they resorted to ijtihad(identifying in this manner the ahkamfor new situations). They named this practice ray. Abu Bakr and `Umar were among those who used this method".
Later on al-Dawalibi cites a Riwayahin which `Umar ibn al-Khattab is reported as having written to Shurayh and Abu Musa al-'Ash'ari: " of the Prophet (S) did not rely in their ijtihad upon fixed laws and established criteria; rather, they relied upon something which they considered as the spirit of the Law".
This statement has also been quoted in different words from `Umar ibn al-Khattab, such as: "Identify similar and analogous cases and use qiyas (analogical method) in matters." (We will elaborate on this topic in the discussion about the historical development of qiyas, which is the fifth source of Sunni ijtihad.) In any case, it was after the demise of the Prophet (S) that some of the Sahabah raised the issue of ray and opened its doors.
In this way, they deduced a certain hukm for every issue and problem for which there was no specific nass. The Tabi'un and a majority of Sunni jurisprudents followed their example.
Besides the practice of ray, other instruments for deriving legal presumption (such as qiyas, istihsan, masalih mursalah, etc.) also entered the realm of ijtihadand the Sunni fuqaha' relied upon those sources, although they were not uniform in their reliance on such instruments (this will be elaborated further while discussing the sources of ijtihad).
It was the result of the difference of opinions between the fuqaha' of the Ahl al-Sunnah regarding the trustworthiness of these sources that diverse legal schools came into being.