Kargil war, from May 3 to July 26, 1999, took place after Pakistani troops were detected on top of the Kargil ridges. Pakistan had started planning the attack in 1998 itself. It is also believed that the proposal for such an attack was given by previous Pakistan Army chiefs to Pakistani leaders but the proposals had then been shelved fearing an all-out war. Even the then Pakistani prime minister Nawaz Sharif claimed that he had no knowledge of such an attack till he got a call from his Indian counterpart Atal Bihari Vajpayee.
In 1999, the infiltration of the Pakistani Armed Forces into the Indian territory was codenamed "Operation Badr" with an aim to cut off links between Kashmir and Ladakh forcing India to negotiate a settlement of the Kashmir dispute. Initially, Pakistan pinned the blame of the attack on Kashmiri insurgents but the documentary evidence from the casualties proved Pakistan Army's direct involvement in the attack.
The armed conflict between India and Pakistan in Kargil and elsewhere along the Line of Control (LoC) was taking place just months after Vajpayee and Sharif signed the Lahore Declaration in February 1999. The February conference was aimed at deescalating the tensions that had existed since May 1998 over the Kashmir issue, but the issue further flared up after with the Kargil war.
The three phases of the Kargil War included infiltration by Pakistan so as to occupy strategic locations to bring NH1 within its control. In the second phase, India was seen identifying the infiltration and responding to it while the third phase saw major battles between Indian and Pakistani forces.
Due to the inhospitable conditions in the area, which has mountains up to 18,000 feet high with harsh wind and -60 degrees Celsius temperatures in winter, it was part of a "gentleman's agreement" that the armies of India and Pakistan will not occupy posts from 15 September to 15 April each year. But Pakistan breached the trust to gain an upper hand in the Kashmir conflict.
Pakistan infiltrated into the Mushkoh Valley, the Marpo La ridgeline in Dras, in Kaksar near Kargil, in Batalik sector, in Chorbatla sector and in Siachen's Turtok sector over a period of several months. In early May, an Indian patrol team acted on a tip-off by a local shepherd in the Batalik sector, and led to the infiltration being exposed.
Ascertaining the extent of the infiltration, India responded with Operation Vijay and mobilised 200,000 troops. Indian Air Force also launched Operation Safed Sagar joining the Army on May 26. With Army and IAF already in operation, the Indian Navy too strategically mounted pressure on the enemy through Operation Talwar, patrolling aggressively of the Pakistani coasts.
The National Highway 1 (NH1), which was the lifeline of India for logistics and supply, was under Pakistani watch from over 130 of their occupied observation posts. Along with being equipped with small arms and grenade launchers, the infiltrators were also armed with mortars, artillery and anti-aircraft guns. The main priority thus for India was to regain control of the hills overlooking NH 1. Over the next two months, India regained control of these hills overlooking NH 1 before it turned to pushing the intruders back across the LoC.
Not anticipating such a fierce retaliation from India, Pakistan moved to America to seek help in de-escalating the border tensions. The then US President Bill Clinton, however, refused to intervene until Pakistan withdrew its forces from the Indian side of the LoC. Pakistan also had to bow down to international pressure along with the sustained retaliation from Indian forces and move back to its territory.
Army in close coordination with the Indian Air Force launched its final attacks in the last week of July clearing all of Pakistani forces from the area. The fighting ended on 26 July which has since been celebrated as Kargil Vijay Diwas.