India claims Kashmir on the basis of the Instrument of Accession , a legal agreement with Kashmir 's leaders executed by Maharaja Hari Singh , then ruler of Kashmir , agreeing to accede the area to India .