Surah 12, Ayah 55 says, “Appoint me over the storehouses of the land; surely I will be a knowledgeable guardian.”
The following verse relates to Prophet Yusuf (AS) asking the azeez in Egypt to appoint him as the minister of agriculture. There are some interesting points in this.
1) Yusuf (AS) extended his hand in cooperation to a non-Muslim in a land governed by non-Muslims.
2) Yusuf (AS), through Allah’s guidance, sought to be in a leadership role when the people in the land were not upon Tawheed and lacked spiritual insight.
3) Yusuf (AS) proved his spiritual and moral qualifications to be entrusted with authority after interpreting dreams and absolving himself from charges of immorality from the Azeez’s wife.
The wisdom of this is that there is nothing wrong with Muslims being involved in governments that are in Muslim minority lands and assisting in the betterment and preservation of law and order in those societies as long as Muslims are not violating Islamic ethical principles.
Those who say that Muslims cannot be involved in any politics outside of establishing the khilaafah miss the logic of the surah that in it is the 40th ayah which says “Legislation is not but for Allah.” This statement was misapplied by the khaawarij during their non-cooperation and revolt against Imam Ali (KW). We are to cooperate with any government except in those matters when it is directly promoting sin and enmity. Yusuf (AS) was not promoting the religion of the Egyptians; he was involved specifically with managing agriculture that nourishes lives.
May Allah (SWT) grant us spiritual insight and make us of those who have wisdom to help lead with the best ethics.