There is a legend of this temple name that it was built to celebrate the victory of Sukhothai to Khun Sam Chon who is the governor of Chod city. (This town is located in Tak
province or maybe Mae Sod district or an ancient city in the neighboring country as well). Khun Sam Chon sends the army to invade Tak province. So, King Indraditya sends the army to beat. When they are fighting on an elephant's back, King Indraditya is defeated. At that time, one son who is only 19 years old. He rides an elephant to help his father and drive Khun Sam Chon out successfully. And then, King Indraditya has established his son to be "Phra Ramkhamhaeng" or King Ramkhamhaeng later.