In modern times, then, Hinduism as a separate religion thereby became identified with the state itself.
In ancient times, a king ruled justly by upholding dharma. Buddhist kings did similarly. But Hinduism as a separate religion was never imagined to be the official ideology of a state until the modern era.