Kashmir was ruled by a Hindu King at the time of partition
of India. Britishers had given all the kingdoms three options
viz. merge with India, merge with Pakistan or stay independent.
Maharaja Hari Singh of Kashmir decided to choose the third.
But since Kashmir was and is a muslim majority state, Pakistan
thought it was right for it to merge with Pakistan whether
Hari Singh agreed or not. So they sent musilm guerillas along
with it's troops into Kashmir. Hari Singh panicked and
thought it is better to merge with secular India than with muslim
Pakistan. So he merged with India. Indian troops pushed back
the Pakistanis from 2/3 of Kashmir's territory. The then
Prime Minister of India, Jawaharlal Nehru was a idealist.
UNO had come into existence just 2 years before. So Nehru in
the spirit of peace agreed to a ceasefire! Although if he had
waited for a few more days the entire Kashmir would have been
freed of Pakistani occupation.
Pakistani claim on Kashmir at the time of partition was solely
due to it's muslim majority. Now, India has the second largest
muslim population in the world! And it is a secular country
even though 80% are Hindus. After loosing three wars with India,
Pakistan has adopted a strategy of Muslim fundamentalism. And
after going nuclear with the help of China and North Korea it
wants to attract world attention by threatening a nuclear war.
India could have easily bombarded Pakistan this time but chose
to exercise restraint and kept the war on it's side of the border.
As a matter of fact, thanx to India being a secular democracy and
also due to their largely non-violent nature Indians go out of
their way to maintain secularism.