Nan for centuries was a separate, autonomous
kingdom with few relationships with the outside world. There is evidence of prehistoric habitation, but it wasn't until several small
mueang united to form
Nanthaburi on the
Nan River in the mid-14th century, contemporaneously with the creation of
Luang Prabang and the
Lan Xang (Million Elephants) kingdom in
Laos, that the city became notable. Associated with the
Sukhothai Kingdom, the
mueang took the title
Wara Nakhon and played a significant part in the development of early
Thai nationalism. By the end of the 14th century Nan was one of the nine northern Thai-Lao principalities that formed
Lanna. The city-state flourished throughout the 15th century under the name
Chiang Klang ('middle city'), a reference to its position roughly midway between
Chiang Mai ('new city') and Chiang Thong ('golden city'), today's
Luang Prabang). The
Burmese took control of the kingdom in 1558 and deported many of the inhabitants to
Burma as slaves; the city was deserted until northern Thailand was retaken from the Burmese in 1786. The local dynasty then regained local sovereignty and it remained semi-autonomous until 1931 when Nan finally accepted full
Bangkok dominion. Part of its territory had been annexed to Laos by the French in the late-19th century. Parts of the old city wall and several early
wats dating from the Lanna period can be seen in contemporary Nan. The city's wats are distinctive; some temple structures show
Lanna influence, while others belong to the
Thai Lue legacy brought from
Xishuangbanna in
China, where the Thai Lue people originated. ==Climate==