There's an SF writer I really like for his books in the vein of this. His name is L. E. Modesitt, and some of his books that discuss this are the "Parafaith War" and probably the best "Adiamante."
The real ruler is a man living in a shack in the middle of nowhere who only cares about his cat and an occasional glass of whiskey.