Northern Thailand’s history has been characterised by the shifting powers of various independent principalities. One of the most significant early cultural influences in the north was the Mon kingdom of Hariphunchai (modern Lamphun), which held sway from the late 8th century until the 13th century. The Hariphunchai art and Buddha images are particularly distinctive, and many good examples can be found at the Hariphunchai National Museum in Lamphun.
The Thais, who had migrated down from China since around the 7th century, united various principalities in the 13th century – this resulted in the creation of Sukhothai and the taking of Hariphunchai from the Mon. In 1238 Sukhothai declared itself an independent kingdom under King Si Intharathit and quickly expanded its sphere of influence. Sukhothai is considered by Thais to be the first true Thai kingdom. In 1296 King Mengrai established Chiang Mai after conquering the influential Mon kingdom of Hariphunchai.
Later, Chiang Mai, in an alliance with Sukhothai in the 14th and 15th centuries, became a part of the larger kingdom of Lan Na Thai (Million Thai Rice Fields), popularly referred to as Lanna. This extended as far south as Kamphaeng Phet and as far north as Luang Prabang in Laos. The golden age of Lanna was in the 15th century. For a short time the Sukhothai capital was moved to Phitsanulok (1448–86), and Chiang Mai became an important religious and cultural centre. However, many Thai alliances declined in the 16th century. This weakness lead to the Burmese capturing Chiang Mai in 1556 and their control of Lanna for the next two centuries. The Thais regrouped after the Burmese took Ayuthaya in 1767, and under King Kawila, Chiang Mai was recaptured in 1774 and the Burmese were pushed north.
In the late 19th century Rama V of Bangkok made efforts to integrate the northern region with the centre to ward off the colonial threat. The completion of the northern railway to Chiang Mai in 1921 strengthened those links until the northern provinces finally became part of the kingdom of Siam in this early period of the 20th century.