នៅសម័យបុរាណ មានកសិករម្នាក់ឈ្មោះ ឆ្មារ មានភាពឧស្សាហ៍ព្យាយាម និងមានសិល្បៈខាងសង់ប្រាសាទ។ ពេលនោះមានព្រះរាជាស្រីជ្រលងស្រឡាញ់ឆ្មារ ដោយសារតែស្នេហារបស់គាត់ និងជំនាញពិសេសក្នុងការសាងសង់។ ព្រះនាងស្នើឱ្យឆ្មារ សាងសង់ប្រាសាទមួយក្នុងរយៈពេលតែយប់តែមួយ។ ប្រសិនបើគាត់អាចសាងសង់រួចបាន នាងនឹងរៀបការជាមួយគាត់។ ឆ្មារយល់ព្រម ហើយបានប្រើជំនាញ និងជំនួយរបស់វិញ្ញាណឬអារក្ស ដើម្បីសាងសង់ប្រាសាទឆាប់រហ័ស។ ប៉ុន្តែព្រះនាងបាបក្បត់សន្យា ហើយគ្រោងបង្កើតអំពើបន្លំ ដោយធ្វើឱ្យមានសំឡេងឧក្រិដ្ឋដូចជាពន្លឺព្រឹក ដើម្បីឱ្យឆ្មារឈប់សាងសង់។ ក្រោយឆ្មារដឹងថាត្រូវក្បត់ គាត់ខឹងខ្លាំង និងបាត់បង់ជីវិត (ក្នុងខ្លឹមសារខ្លះមាននិយាយថា ឆ្មារបានប្រទះវិបត្តិ ឬប្រព្រឹត្ដអត្តឃាត)។ ប្រាសាទនោះក៏ត្រូវបានគេហៅថា ប្រាសាទបន្ទាយឆ្មារ ដើម្បីរំលឹកដល់ឈ្មោះរបស់គាត់។ In ancient times, there was a farmer named Chhma who was hardworking and skilled in temple construction. At that time, a princess fell in love with Chhma because of his dedication and special talent in building. The princess challenged Chhma to build a temple within a single night. If he succeeded, she would marry him. Chhma agreed and used his skills — along with the help of spirits or supernatural beings — to construct the temple rapidly.
However, the princess betrayed her promise and devised a trick to create the illusion of dawn by making loud noises and simulating morning light, causing Chhma to stop building. When Chhma discovered he had been deceived, he was filled with rage and lost his life (some versions say he faced misfortune or committed suicide). The temple was later named Banteay Chhmar ("Chhma's Citadel") to commemorate his name.