In 215, Zhang Lu submitted to Cao Cao, the ruler of the Wei Kingdom, surrendering his state in exchange for gaining state religion status for Tianshi Daoism. Zhang was given a title and land, as were several other family members and generals. His daughter was married to Cao Cao’s son, Cao Yu. His followers were forced to resettle in other parts of China, with one group being sent to the Chang'an area, and another being sent to Luoyang. Zhang relocated to the Han court until the Han Dynasty changed to the Wei. He then used his own popularity as a religious leader to lend legitimacy to the Wei, proclaiming that the Wei court had inherited divine authority from the Tao church, as well as from Confucian laws.