As long as the existence of the territory was guaranteed by the United Kingdom, the weaknesses in its structure and along its peripheries were not of great consequence; following the British withdrawal from South Asia in 1947, however, they became apparent. By the terms agreed upon for the partition of the Indian subcontinent between India and Pakistan, the rulers of princely states were given the right to opt for either Pakistan or India or--with certain reservations--to remain independent. The maharaja of Kashmir, Hari Singh, initially believed that by delaying a decision he could maintain the independence of Kashmir, but, caught up in a train of events that included a revolution among his Muslim subjects along the western borders of the state and the intervention of Pashtun tribesmen, he signed an Instrument of Accession to the Indian Union in October 1947. This was the signal for intervention both by Pakistan, which considered that the state was a natural extension of Pakistan, and by India, which intended to confirm the act of accession. Localized warfare continued during 1948 and was terminated through the intercession of the United Nations in a cease-fire, which took effect in January 1949. In July of the same year, India and Pakistan defined a cease-fire line that divided the administration of the territory. Regarded merely as a temporary expedient, this partition along the cease-fire line still exists, though warfare between the two contestants was briefly resumed in 1965 and again in 1971, despite the many proposals made to end the dispute.