Let's say that you want to be a dictator. You’re not Stalin or Hitler or Mao: You are not above some killing and even mass bloodshed, but you also are not planning on killing millions in five year plans or final solutions or great leaps forward. You just want a state you can control, steal from, lord over, and stake a proprietary claim to for the rest of your life, knowing full well that the legacy you will leave is unlikely to be smoothed over any time soon.
Here is what I might suggest that you do if your hold on your nation appears threatened by the candidacy of someone almost certainly more popular than you are:
Detain your rival. Do it more than once.
Use food as a weapon against a hungry populace. Hinge their access to foodstuffs to their support for you.
You’ve detained the other party's leader. Now prevent that party from holding rallies or otherwise campaigning. Say you’re doing it out of concerns for their own safety! No one said you would not be able to have your fun in these trying times. All despotism and no play, after all . . .
Harass diplomats, aid workers and anyone else who might be able to apply pressure or otherwise call you out. Sunlight is the best disinfectant, or so they say: Extinguish that light!
It also is useful, though possibly beyond your control, to have the leader of the biggest regional power either in your pocket or simply have him or her be so feckless that he poses no difficulty for you. The jig would be up were that neighbor to act. This one requires a lucky break or two — we cannot pick or neighbors after all. But successful tyranny does require a little bit of luck.
By following these few simple steps you should be able to maintian control of your country, giving you ample time to continue driving your one-time jewel into chaos, obsolescence, and despair. Good luck, and godspeed.