We will never tire of repeating that quote of Vidyaranya from his Panchadashi that amply illustrates how he managed affairs of state as well as those of the Spirit:
ज्ञानिना चरितुं शक्यं सम्यग्राज्यादिलौकिकम्
It is indeed possible for the enlightened one to navigate politics and worldly affairs well