and that is because the threatened punishment only overtakes the one who commits a forbidden act when he knows it is forbidden, or at least was in a position to learn of its prohibition. A person who grows up in the desert, or who has only recently embraced Islam, and then performs something unlawful without being aware of its unlawfulness, does not incur sin, nor is he subject to the prescribed penalty—even though he had no scriptural proof for treating the act as permissible.
Hence, if the prohibiting hadith never reached someone, and he actually relied on a lawful proof to deem the act permissible, he is even more entitled to be excused.
For that reason such a person is rewarded and commended for the very ijtihad he exerted. Allah, exalted is He, says: “And David and Solomon, when they gave judgment concerning the field into which the sheep of some people had strayed by night; We witnessed their judgment. We made Solomon understand it, yet to each of them We gave judgment and knowledge” (78–79) (1). Solomon was singled out for the deeper understanding, while both were praised for judgment and knowledge.
In the two Ṣaḥīḥs it is related from ʿAmr ibn al-ʿĀṣ (may Allah be pleased with him) that the Prophet ﷺ said, “When a judge exerts ijtihad and reaches the correct conclusion, he has two rewards; if he exerts ijtihad and errs, he still has one reward.”
It is therefore clear that a mujtahid, even when mistaken, still earns a reward on account of his ijtihad, and his error is forgiven; for attaining the exact truth in every single ruling is either impossible or exceedingly difficult. Allah the Exalted has said, “He has not placed upon you in the religion any hardship”