What was the history of Pakistan and India with kashmir?

India gave a Prince a piece of the country, which was very beautiful, for him to have his palace and rule. It was passed down for generations and then they died out. Pakistanis live here and so do Indians. It followed many Indian traditions and teachings even though Pakistanis lived here too. It kind of broke into a fight to see which country it should belong to- Pakistan (with the major religion in Kashmir) or India (who previously owned it). They decided to have a vote. Pakistan needed a lake there to survive but, some thought it was India's now. The vote was coming up but- Pakistan attacked. They went into a city in India and terrorized it for the land. This cancelled the voting and we still don't know who the land belongs to. What country do you think it should be?