In the 16th century Nonthaburi was declared a province. Prior to that, it was a village named Talat Khwan. During the reign of King Prasat Thong, a canal was dug in order to create a shorter route for the Chao Phraya River to flow. This canal changed the route of the river and it is still present today. However, this shorter route allowed an easier access to Ayutthaya, so King Narai decided to built a fortress in 1665. This resulted in the town of Nonthaburi moving closer to the fortress.