Did Muslim scholars stipulate that the Muslim ruler has to be the most knowledgeable among the Muslims?
All perfect praise be to Allaah, the Lord of the worlds. I testify that there is none worthy of worship except Allaah and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
We know of no scholar who stipulated that one of the conditions and basics of assuming the major leadership in Islam is for the Muslim ruler to be the most knowledgeable among the Muslims. They only stipulated that the Muslim ruler should be competent for doing Ijtihaad (personal reasoning) in deducing religious rulings. The Hanafi scholars believed that the acquisition of Islamic knowledge is a priority condition. So they accepted the leadership of a candidate of average knowledge who stuck to imitation (Taqleed), even if a Mujtahid (i.e. scholar who has met certain requirements qualifying him to undertake Ijtihaad) is available.
"There are seven conditions of eligibility for major leadership (rulership):
First, justice of probity with all its comprehensive conditions,
Second, knowledge conducive to the exercise of Ijtihaad in deducing rulings on new contemporary issues or decision making..." [Al-Ahkam As-Sultaniyyah]
Allaah Knows best.
You can search for fatwa through many choices