dynasty moved the capital of Thonburi to Rattanakosin, today's Bangkok. Bangkok had previously been a small settlement with a fort, but it was strategically located on the eastern shores of the Chao Phraya river and was known among the foreign traders as the 'key to Siam'. New palaces and temples were built. The Emerald Buddha and Wat Phra Kaeo were founded. The king's goal was to transfer the old splendor of Ayutthaya to the new capital. In his new capital, Rama I crowned himself in 1785 in a splendid ceremony. During the reign of Rama I, the foreign policy was still focused on the threat represented by Burma. Burma's new king Bodawpaya ordered the nine Burmese armies in a surprise attack against Siam, while in 1786 the Burmese army invaded the Three Pagoda Pass. It came to the "Nine Armies' Wars". In all cases, the Siamese remained victorious after the fighting. In 1805 Lanna (North Thailand) was largely brought under control of Bangkok. Rama I also attempted unsuccessfully to conquer the important trading ports of Tenasserim. At the time of Rama I, Cambodia was practically administered as a province of Siam, as rival Vietnam had to deal with internal problems. Only when the new Vietnamese emperor Gia Long had ascended to the throne was the influence of Siam in Cambodia again contested. Relations with Vietnam took on a prominent place in this epoch. There were no significant relations with the European colonial powers during the reign of Rama I. One of the most important achievements of Rama I was the codification of all the country's laws into a work of 1,700 pages called the Three Seals Law. This law remained valid in its basic traits until the beginning of the twentieth century. Siam also had a high level of cultural achievement. The Buddhist canon (Pāli Canon) was collected and reformulated within the framework of a Grand Council. The arts were promoted, as well as the construction of new palaces and temples in the capital. Literature and theatre also thrived; in this epoch were produced works such as the important, 3,000-page Ramakian. Works from Chinese, Mon, Javanese, Persian, and Indian languages were translated into Thai. Rama I, the first king of the Chakri dynasty, continued the traditions of Ayutthaya in many respects. However, the new empire was still more tightly centralised than its predecessors. A particularly important innovation was the stronger