After defeating Dara Shikoh in the war of succession, Aurangzeb had him declared a heretic and atheist by the ulema, which provided religious justification for his execution. Dara was paraded through the streets in humiliation and then beheaded in 1659. This eliminated Aurangzeb's main rival and secured his position as emperor.