Enter the CIA:
Three letter agencies of the US government have a long and illustrious history of egregious blundering. Directly relevant to our little fracas are the actions of the CIA through the history of the Afghan conflict in the 1980s .. perhaps the seminal one being the miscalculation of arming fundamentalist Islamic groups, with no reasonable exit strategy after the former USSR withdrew. As any semiconscious observer could have predicted, the departure of the USSR was followed by export of armed insurrection far beyond the borders of Afghanistan, including acts of terrorism within the continental USA.
Not willing to rest on their laurels, the CIA failed to detect (eventually successful) plans for bomb attacks upon US embassies, and then scapegoated the now infamous Osama Bin Laden on evidence that, to put it kindly, was tenuous at best (unkind people might say nonexistent). Under the deft guidance of the CIA, the US committed several further idiocies; among the more spectacular embarassments were the bombing of a factory in Sudan that was purported to make chemical weapons, and some expensive earthmoving excercises in Afghanistan. The gentle reader is invited to peruse news reports of the period for details.
For their erstwhile support of the Afghan rebels, the US had relied heavily on the friendly offices of the Pakistani government, which provided convenient and deniable conduits for support to the Afghani mujaheddin. With the departure of the Red Army, the Afghanis reverted rapidly to their centuries old practice of internecine warfare. The US attacks on the Afghani camps prompted some of the mujaheddin to move into the Gilgit, Astor and Skardu areas of Pakistan. Directly across the Line of Control between Pakistan and India. These moves had the tacit blessing of the Pakistani government, who understood that trained, armed bands of bloodthirsty Islamic militants were the perfect lunatics to send into Kashmir to fight, kill and die for the glory of Greater Islam. And if along the way Kashmir came under Pakistani domination, so be it. Inshallah.
So for the better part of the 1990s, Pakistan funnelled a steady stream of said lunatics into Kashmir and a few other selected areas. The Indians responded by turning Kashmir into an armed camp. Recall that India has had considerable experience in dealing with insurgency over the years especially in the last 2 decades. Slowly the Indian army managed to quell the militancy, so much so that tourism in Kashmir actually began to rise over 1998.
Sonn thereafter, the Prime Ministers of India and Pakistan met at Lahore and expressed their mutual amity and desire to work out negotiated settlements, blah,blah,blah. Conspicuously absent at this lovefest were several senior members of the Pakistani armed forces who were not quite ready to forgive the Indians for their dismemberment of Pakistan in 1971. The slow waning of the Kashmir revolutionary movement was not to their liking either. So they dusted off the Azizuddin plan, and began to implement in in the winter months of 1999. (It is not completely clear how much the Prime Minister of Pakistan was told of these preparations.) There was a difference this time however. No longer were the generals content to use the Afghani mujaheddin alone. This time, regulars of the of the Northern Light Infantry of the Pakistan army were used as well. The Pakistani army was, without civilian oversight, mounting an armed invasion of India. Can you spell "causus belli" ? The Line of Control in the northern reaches of Kashmir was not usually manned or patrolled extensively by either side in the winter months. By May 1999, aided in part by unseasonally early warm weather, Pakistani forces held postions on tactically dominating ridgelines as deep as 7 to 10 kilometers within Indian held territory, and had established resupply routes as well.