In 1782, after the passing away of King Taksin of Thon Buri, today part of Bangkok located on the west bank of the Chao Phraya River, Chao Phraya Maha Kasatsuek ascended the throne and was known as King Buddha Yodfa or Rama I. The King moved the capital to the opposite side of the river known as Bangkok, and established the Chakri Dynasty. The main reason for the removal was that Bangkok had a better location for protection from foreign invasions as it was separated by the river from the west bank and also covered a bigger area. Then canals were dug around the city starting from the expansion of Banglamphu and Ong Ang canals to the east. When finished, the two canals were joined together and linked the Chao Phraya River at both ends so the city was surrounded by water and the whole canal was named "Khlong Rop Krung" meaning the canal round the city. These canals together with other smaller ones were the source of Bangkok's nickname "Venice of the East".
King Rama I then commanded the construction of the Grand Palace close to the river modeling on the ancient palace of Ayutthaya with a royal temple, the Emerald Buddha Temple, within the city walls.