According to Nilamata Purana , Kashmir did not participate in the war of Mahabharata along with other Kingdoms of India though it was very important Kingdom.It is explained in the dialogue between Janamejaya and Vaisampayana the pupil of Ved Vyasa as follows:-
The King of Kashmir Gonanda was invited by his relative Jarasandha to join him in the war against the Yadavas.Gonanda joined the war and was killed by Krishana’s brother Balrama during the battle.Gonanda’s son Damodara wanted to avenge his father’s death.When lord Krishna was in Gandhara attending a Svayamvara ceremony, he decided to go to Kill Krishna but instead, Krishana killed him.Keeping in view the sacred special status of Kashmir and womenfolk of the region, Krishana coronadted Damodara’s pregnant widow Yashomati as the ruler of Kashmir.Thus Yashomati became the first woman ruler of Kashmir.
After some years,when the Mahabharata war took place, her son was still a minor.Yashomati chose not to participate in the Mahabharata from either side and remained neutral and saved her region from ruin caused by war in the rest of India.
After the death of her husband, King Damodar, at the hands of Krishna in the battle field, the ruling elites were shocked to hear Krishna’s command that Yashomati will occupy the throne who is pregnant having the infant of the deceased king in her womb. The queen ruled the kingdom with a stern hand, identifying the corrupt and anti-people officers. She punished them severely and was prompt to deliver justice to the aggrieved. She won the hearts of her people. Exposed, the members of the council were working day and night to over-throw the queen. In due course, Yashomati gave birth to a male heir to the kingdom.
History informs us that Sri Krishna also named the child Gonanda . However the council of ministers in league with the royal priest, decided to enthrone the infant, forcing the queen to abdicate the throne. Brave, wise and master strategist, Yashovati understood the gameplan and inflicted crushing defeat on the conspirators,. She also gave proper education to her son befitting of a brave, just and kind ruler. She was the first woman ruler of Kashmir. Her rule gave Kashmir peace , stability and corruption free administration . History has been unkind to her as she has not been given much deserved space and remains unknown.
(The author is a Supreme Court Lawyer and a Kashmir expert)