An Outline of the History of Restriction on Ijtihad
3. Another reason-and this is the major one given by him-is that there is a consensus of the Ummah on relying upon earlier generations for the knowledge of the Shari`ah. Therefore, it is inevitable for us to rely on their authority and not to accept anything except that which has been narrated from them through authentic chains and compiled in famous books together with clarifications of their most probable meanings, particularization or limitation of statements of a general import, and reconciliation of conflicting texts. These characteristics are not found in any except the four madhahib, and there is no other madhhab possessing these qualities except the Imamiyyah and the Zaydiyyah. But since they are heretical, it is not permissible to rely upon their opinions. Therefore, the choice is restricted to following one of the four madhahib.
[A Defence of the Imami School:]
I say: Probably what he means is that if there exist several ways of fulfilling an obligation, any one of them can be chosen, but if all the ways except one are closed, that one will be specifically binding. The conclusion which can be drawn from his observations is that he admits that the four Sunni madhahib along with the Imami and Zaydi madhhabs fulfil the above-mentioned criteria of acceptance and reliance, but since the last two are deviant on account of containing heretical views, the choice is restricted to the four madhahib only.
In view of this assertion it should be said that the allegation that the Imamiyyah madhhab contains heresies is a monstrous calumny and slander-may God protect us from it.
To be sure, Shah 'Abd al-'Aziz, son of Shah Wali Allah, had the audacity to propagate these calumnies in the ninth chapter of his book al Tuhfat al-Ithna 'Ashariyyah which deals with the issues of fiqh and Shari'ah. 'Allamah Dehlawi, in the ninth volume, of his book al-Nuzhat al Ithna'Ashariyyah, a refutation of the ninth chapter of the Tuhfah, refutes each one of his statements and proves the purity of the Imami school from any bid'ah and such laws as are not based on God's revelations to the Prophet, may peace and God's benedictions be upon him and his Household.
When it is established that the Imami madhhab contains no bid'ah, and as it stands on an equal footing with the four Sunni schools as per the admission of Shah Wali Allah, there remains no reason for preferring the four to the Imami madhhab; rather, the Imami madhhab enjoys priority over them because it has been transmitted through sahih and reliable chains of narrators from the Infallible Imams, who were divine 'ulama' who had inherited the knowledge from their ancestor, the Prophet, may peace and God's benedictions be upon him and his Household, and whom God, the Exalted, had imparted all the divine sciences which He had entrusted to His prophet (s). Hence they do not say anything except that which was revealed to their ancestor, who did not speak out of caprice ([53:3]) and as we mentioned earlier, their chain of transmission goes back to the gateway of the Prophet's knowledge. 
All praise is for God who guided us to this, and we would not have been guided had not God guided us (7:43). What I have said is not out of any bias. By God, who has blessed me with being, I have not found in their statements and their writings and books (i.e. of the Ahl alSunnah), some of which I have mentioned here, and have not come across up to this day even a single piece of evidence supporting the claim that it is obligatory to follow one of the four madhahib and unlawful to adhere to any except these, nor any evidence for preferring these four madhahib to others. And God is witness over what I say, and all praise belongs to Him, at beginning and end.
(Written by this sinner, Muhammad Muhsin, known as Agha Buzurg al-Tehrani, in Rabi` al-Awwal 1359 H. )