Imaam Bukhari says:
A`ishah (RA) was led in the Salat (prayer) by her slave Dhakwan who used to recite from the Mushaf [the written Qur’an (not from memory)]. Can an intelligent boy, a Bedouin or a boy who has not reached the age of puberty lead the Salat? (It is permissible according to) the statement of the Prophet (SAW) that the Imaam should be a person who knows the Qur’an more than the others.
Narrated Ibn ‘Umar:
When the earliest emigrants came to Al-‘Usba a place in Quba’, before the arrival of the Prophet, Salim – the slave of Abu Hudhaifa – who knew the Qur’an more than the others, used to lead them in prayer.
The Prophet said, “Listen and obey (your chief) even if an Ethiopian whose head is like a raisin were made your chief.”
It’s not wealth or status or lineage that makes a person worthy of leadership. Rather it’s knowledge, wisdom and intellect. And once someone has been appointed leader over you, you have to obey him regardless of his age, wealth, appearance, lineage etc. Only when he asks you to do something against Allah’s laws, can you defy him.