The First Kashmir War
Pakistan went into their first war with India over fears of unfair accession of Princely state of Kashmir and Jammu to India.
In October 1947, Pakistan feared that Maharaja Hari Singh of Princely state of Kashmir and Jammu would accede to India despite having a majority Muslim population.
Tribal forces with support from Pakistan Army attacked and occupied parts of the princely state. The action paved a way for Maharaja Hari Singh to receive support from Indian military by signing the Instrument of Accession of the princely state.
To help with cease-fire from both fronts, United Nations mediated by passing a resolution on 22 April 1948 with establishment of Ceasefire Line — later known as the Line of Control. A formal cease-fire was put in place on 1 January 1949. Both countries have held on to the captive areas since then.
The Pakistan controlled areas are collectively referred to as Pakistan administered Kashmir or Azad Kashmir.