Answer: first u would need to gain popularity. Then there are two different ways to ensure their loyalty. 1 - be a tyrant and force the people to be loyal to you. 2 - Be a good leader, set good examples, and find compromises where people argue.
Explanation: Hope this helped!