Mangrai founded his grandest capital, Chiang Mai, in 1296 and began to embellish it with temples. His forces successfully campaigned against the Chinese Mongols in Southern Yunnan, but after 1311 he sent tribute to the Mongols and averted further threats from the north. He died in the middle of the city, reputedly from a lightning strike, in the year 1317.
Mangrai had three sons. The second son, Chai Songkhram, was to continue the dynasty that ruled Lanna until the demise of Phra Mekuti in 1564