Hasan al-Basri (may Allah have mercy on him) said in the explanation of the verse ﴿وَأُولِي الْأَمْرِ مِنْكُمْ﴾: What is meant are both the rulers and the people of knowledge.