Muhammad was, first of all, a Prophet of course, a beloved and lover of God, a father, an army commander, a judge, a ruler of a community, the King of Medina and later of Arabia, and all of these were combined in him and his destiny, the reason God brought him on earth, was to show how each of the functions which human beings have in life have the perfect form in the prophet.
Called to the throne of my fathers, I have taken over the government, looking to the King of all kings, and have vowed to God, following the example of my father, to be a righteous and gentle prince, to foster piety and the fear of God, to maintain peace, to further the welfare of the country, to be a help to the poor and oppressed, and to be to the righteous man a true protector.