The temple was founded by King Songtham, King of the Ayutthaya Kingdom during the early 17th century. According to legend, the King sent out monks to Sri Lanka to pay tribute to the footprints of the Buddha there. Upon arrival, the monks were told that the Buddha had also travelled through Thailand and that there should be footprints in their own country. On the monks’ return, the King ordered his people to search for the footprints of the Buddha in his Kingdom.
The legend tells a local man discovered the footprints by chance in 1623, when he followed a wounded deer. When the deer emerged from the bushes, it was fully cured and ran away. Pushing aside the bushes the man found a large footprint filled with water. After drinking the water, he was immediately cured from a bad skin disease. After hearing of the discovery, the King ordered a temple to be build over the footprint of the Buddha.
The temple was destroyed in 1765 during the Burmese-Siamese war that meant the end of the Ayutthaya Kingdom 2 years later. The present structure dates from the Rattanakosin era.