Bangkok became Thailand's capital in 1782 under King Rama I, following the fall of the old capital Ayutthaya in 1767 and a brief interim period based in Thonburi. The king moved the capital across the river for better defense and trade, building the Grand Palace and Wat Phra Kaew between 1782 and 1785 — the city has served as Thailand's political and spiritual heart ever since.