The Maharaja of Jammu and Kashmir did not join India or Pakistan in August 1947 at the time of the attainment of independence and partition of the sub continent. It was only after the invasion by the tribes, actively aided and abetted by Pakistan, in October 1947 that the government of Jammu and Kashmir headed by the maharaja and supported by the National conference, a popular political organization, signed an instrument of accession with India on 0ct, 1947.
By this instrument of accession Jammu and Kashmir acceded to India on three subjects - defense, foreign affairs and communication retaining other powers that is-there shall be no concurrent subjects and that the residual powers also vest in the state. In view of the peculiar circumstances relating to Jammu and Kashmir, the constitution of India could not treat it on par with other units of the republic and made some special provisions for it and article 370 lays down certain special provisions relating to Jammu and Kashmir. By virtue of these provisions the parliament's power to legislate in regard to the state shall confine to : a) those matters in the union list and the concurrent list which where ceded to the centre by the instrument of accession that is defense, foreign affairs and communication and b) such other subjects as the president may, with the concurrence of the state govt, by order specify as such the division of powers between Jammu and Kashmir and the Indian Union is of American type thus allowing the state to enjoy full major of autonomy than any other state.
The state of Jammu and Kashmir was also allowed to constitute a constituent Assembly (as envisaged in the constitution of India) to draft a constitution for itself which was adopted and brought into force on January 26,1957. This Constitution deals with the main organs of the government of the state - the executive, the legislature, the judiciary and provides for certain other related matters such as elections, the official language, the public services and the state flag and the elected head of the state. It thus lead to the appreshion that Jammu and Kashmir is racially free from central control and is a republic within a republic. The Jurisdiction of the supreme court of India (w.r.t the holding of the Assembly election also) was extended to the state w.e.f January 26 1960.The nomenclature of the head of the state and head of the executive was also changed. This lead to the appreshion and fear among the people of Kashmir for the dilution and erosion of the autonomy giving a special status to it.