The legend of Khodiyar Ma, traces back to 700 AD, beginning in a small village called Roishala.Roishala came under the province of Vallabhipur, which is a town near presentday Bhavnagar. Mamaniya Gadhvi was an honest, humble man and a devout bhakt ofLord Shiva. His intelligence and gentle candour won him the confidence of ThakurShilbhadra of Vallabhipur. Shilbhadra appointed Mamaniya to the post of Rajgadhvi orPrime Minister of his province.He trusted Mamaniya and would discuss matters of governance at length, much to the chagrin of the other courtiers. Motivated by envy, the courtiers who disliked Mamaniya’s presence by the king’s sidedecided to take action against him. Together, the courtiers approached Shilbhadra’s wife,the queen and told her that Mamaniya being childless was a ‘baanj’ and so aninauspicious presence to have around the king and queen. The next day, Mamaniya was denied entry into the palace.Distraught at the loss of a dear friendship and humiliated at the taboo on his infertility,Mamaniya and his wife Minalde prayed to Lord Shiva. As a last resort, he attempted tosacrifice himself to the deity, when a pleased Shiva appeared before him. Shiva takesMamaniya to Naglok to appeal to Nagdev the king of snakes. Hearing Mamaniya’s tragedy, Nagdev’s children offered to help by reincarnating as Mamaniya’s progeny.
The 7 daughters and 1 son of Nagdev, took birth at Mamaniya’s home on MahasudhAatham. The new parents named their daughters Aaval, Jogal, Togal, Janbai, Holbai,Beejbai, Sosai and the son, Mehrak. Janbai would later come to be known as Khodiyar Ma. The king, Shilbhadra was immensely pleased, and even though conjecture ensued over the birth of so many children so suddenly, Mamaniya was reinstated as PrimeMinister.

Mamaniya’s 8 children were playing in the field once, when , Mehrak was bit by a venomous snake. His sisters rushed to him. Aaval suggested bringing of ‘Ami’ (elixir of life) from the ‘Naglok’ underneath the sea. It had to be brought before the sunset in order to save Mehrak’s life. Janbai volunteered to bring Ami from Naglok before the sunset.

Janbai retrived the Ami and while rushing back to the surface of water, injured her foot on the jagged rocks beneath. She is however; rescued by a crocodile that then escorts heron its back to the surface of the water.

Limping with discomfort Janbai manages to reach Mehrak just in time to doe out the Ami. An injury to the foot is known as ‘Khodi’ and that’s when one of the siblings says,“Khodati aavechhe” (She is limping on her way). For this feat of saving her brother,Aaval grants Janbai the name ‘Khodiyar’, declaring that she would be in future known and worshipped as Khodiyar Ma. This event also made the ‘magar’ (crocodile) her‘vahan’ (vehicle). Crocodile is an amphibian reptile. Ma Khodiyar on a crocodile symbolizes her supremacy over both land and water.

Ma Khodiyar assumed the role of protecting the king, the kingdom and the subjects. Several stories of her having saved people in dire need exist. She would cure the ill on the verge of death with a mere touch of her hand. The recognition of her power, spread far and wide through Saurashtra and Sind. People from distant places would travel to get her darshan. People worshipped her as a goddess and she blessed all her followers as one.