The primary language of the ruling class of Pagan was Burmese, a Tibeto-Burman language related to both the Pyu language and the language of the ruling class of Nanzhao. But the spread of the language to the masses lagged behind the founding of the Pagan Empire by 75 to 150 years. In the early Pagan era, both Pyu and Mon were lingua francas of the Irrawaddy valley. Pyu was the dominant language of Upper Burma while Mon was sufficiently prestigious for Pagan rulers to employ the language frequently for inscriptions and perhaps court usages. Inscriptional evidence indicates that Burmese became the lingua franca of the kingdom only in the early 12th century, and perhaps the late 12th century when the use of Pyu and Mon in official usage declined. Mon continued to flourish in Lower Burma but Pyu as a language had died out by the early 13th century.