On the news of Emperor Yang's murder by General Yuwen Huaji on June 18, 618, Li Yuan declared himself the emperor of a new dynasty, the Tang. Li Yuan, known as Emperor Gaozu of Tang, ruled until 626, when he was forcefully deposed by his son Li Shimin, the Prince of Qin.