The history of the town is shrouded in mysteries due to lack of written evidences or documentation. Popular stories say that a group of early settlers led by warrior Ajay Pal (also called Ajepal), brother of King of Ajmer, Rajasthan arrived and settled there around AD 650 or 805 (Samvat 862). Slowly the settlement flourished and became a centre of trade and commerce. Due to its prosperity and wealth it was often target of invasion of clan warriors. As the founder of the settlement, and later the ruler of the town, Ajay Pal dedicated his life to protect the town. It's believed that he established the first coastal security centre in Kutch somewhere near Anjar. Ajay Pal died due to a mortal wound suffered while fighting Khalifas in Vikram Samvat 741 (around AD 685). Due to his efforts in protecting the town and surrounding area from invaders, and his selfless sacrifice, he is worshiped as a saint and his tomb (also called Samadhi in Hinduism) and temple is located on the outskirts of the town. He is fondly known as the ruler of the town till date.