Kingship Of Prophet Suleiman
Ghamidi sahib told in the beginning that there are two legitimate ways to establish ruler, either God appoints a person as a ruler, and if He does not, then it is the people who are supposed to elect him. In the case you mentioned, God appointed Sulaiman AS