Answer
Emperor Xuanzong ascended to the throne through palace coups. After his father, Emperor Ruizong, abdicated in 712 AD, Xuanzong's elder brother, Emperor Shang, became the new ruler. Xuanzong, then known as Li Longji, joined forces with his aunt Princess Taiping and several high-ranking officials to overthrow Emperor Shang, resulting in the latter's abdication. Subsequently, Xuanzong assumed the imperial throne, marking the beginning of his reign.