The city of Chiang Mai was capital of the Lanna Kingdom after its founding in 1296, during the same period of time as the establishment of the Sukhothai Kingdom. In 1599 the kingdom lost its independence and became part of the Ayutthaya Kingdom. In 1932 the province Chiang Mai moved up to the second level subdivision of Thailand when the administrative unit of MonthonPhayap, the remains of the Lanna Kingdom, was dissolved.