Southeast Asia. The emperors of the Yuan dynasty (1271-1368) in the 13th and 14th century converted to Tibetan Buddhism. The founder of the Yuan dynasty, Kublai Khan, invited lama Drogön Chögyal Phagpa of the Sakya school of Tibetan Buddhism to spread Buddhism throughout his realm (the second introduction of Buddhism among the Mongols). Buddhism became the de facto state religion of the Yuan dynasty. In 1269, Kublai Khan commissioned Phagpa lama to design a new writing system to unify the writing systems of the multilingual empire. The 'Phags-pa script, also known as the "Square script", was based on the Tibetan script and written vertically from top was designed to write in Mongolian, Tibetan, Chinese, Uighur and Sanskrit languages and served as the official script of the empire. Tibetan Buddhist monasticism had an important influence on the early development of Mongolian Buddhism. Buddhist monkhood played significant political roles in Central and Southeast Asia, and the sangha in Mongolia was no exception. The activities of the Mongols were conducive to the prominency of the Sakya school and then the Gelug, and to the further development of Tibeto-Mongolian culture. Northern Yuan dynasty and cultural renaissance (16th century) – third introduction The Mongols returned to shamanic traditions after the collapse of the Yuan dynasty in 1368. Hutuhtai Secen Hongtaiji of Ordos and his two brothers invaded Tibet in 1566. He sent an ultimatum to some of the ruling clergy of Tibet demanding their submission. The Tibetan supreme monks decided to surrender and Hutuhtai Secen Hongtaiji returned to Ordos with three high ranking monks. Tumen Jasaghtu Khan invited a monk of the Kagyu school in 1576. In 1578 Altan Khan, a Mongol military leader with ambitions to unite the Mongols and to emulate the career of Genghis Khan, invited the 3rd Dalai Lama, the head of the rising Gelug lineage to a summit. They formed an alliance that gave Altan Khan legitimacy and religious sanction for his imperial pretensions and that provided the Buddhist school with protection and patronage. Altan Khan recognized Sonam Gyatso lama as a reincarnation of Phagpa lama, gave the Tibetan leader the title of Dalai Lama ("Ocean Lama"), which his successors still hold. Sonam Gyatso, in turn, recognized Altan as a reincarnation of Kublai Khan. Thus, Altan added legitimacy to the title "khan" that he had assumed, while Sonam Gyatso received support for the supremacy he sought over the Tibetan sangha.