The 700 year old city of Chiang Mai was built in 1296 to be the capital city of the Lanna Kingdom (the kingdom of a million rice fields) by its ruler King Mengrai.
The Lanna Kingdom was ringed by high mountains, teak tree forests and well stocked rivers and its fertile valleys and plains were a rich source of agriculture. Chiang Mai was the main trading town between southern China and the sea ports of Burma. As such it was frequently attacked by its neighbours who tried to claim this prized gem as their own.
After centuries of defending itself Chiang Mai was successfully invaded and incorporated into Burma as a vassal state in 1557. Over the next 200 years Chiang Mai fell at various times under the rule of the strongest invader, be it Burma or Siam.
In 1774 the then Lanna King with assistance from Siam finally drove the Burmese out of the Lanna Kingdom. The Lanna Kingdom eventually became part of Siam in 1892. The Lanna Kingdom was gradually dissolved and condensed into a 20,000 km² area centered around Chiang Mai. 1932 the whole Chiang Mai area officially became a province of Siam. In 1949 Siam officially became known as Thailand.