The capital city of the ancient Kingdom of Lanna, Chiang Mai lies in the far north of Thailand, along the banks of the Mae Ping River. Founded in 1296 by King Mengrai, the old walled city is a haven of Buddhist temples, some almost as old as the city itself. The Lanna Kingdom was independent until 1768, when it became a tributary of Siam, although it was not fully incorporated into Thailand until 1939.