The transition from Sui to Tang (613-628) refers to the period between the end of the Sui dynasty and the start of the Tang dynasty. The Sui dynasty's territories were carved into a handful of short-lived states by its officials, generals, and agrarian rebel leaders. A process of elimination and annexation followed that ultimately culminated in the consolidation of the Tang dynasty by the former Sui general Li Yuan. Near the end of the Sui, Li Yuan installed the puppet child emperor Yang You. Li later executed Yang and proclaimed himself emperor of the new Tang dynasty.