Mangrai was the 25th king of Ngoenyang (r. 1261–1292) and the first king of Lanna (r. 1292–1311). He established a new city, Chiang Mai, as the capital of the Lanna Kingdom (1296–1558).: 195