The second war began in April 1965, when fighting broke out in the Rann of Kachchh,a sparsely inhabited region along the West Pakistan–India border. This war started following Pakistan's Operation Gibraltar, which was designed to infiltrate forces into Jammu and Kashmir to precipitate an insurgency against rule by India. India retaliated by launching a full-scale military attack on West Pakistan. The seventeen-day war caused thousands of casualties on both sides and also witnessed the largest tank battle since World War II. In August fighting spread to Kashmir and to the Punjab, and in September Pakistani and Indian troops crossed the partition line between the two countries and launched air assaults on each other's cities.
To be fair though, India had the upper hand during the war. It captured nearly four times more territory than Pakistan did, most of it high-value territory in Punjab and Kashmir. According to the US Library of Congress Country Studies, “a continuation of the fighting would only have led to further losses and ultimate defeat for Pakistan”.
After threats of intervention by China had been successfully opposed by the United States and Britain, Pakistan and India agreed to a UN-sponsored cease-fire and withdrew to the pre-August lines. Prime Minister Shri Lal Bahadur Shastri of India and President Ayub Khan of Pakistan met in Tashkent, USSR (now in Uzbekistan), in Jan., 1966,and signed an agreement pledging continued negotiations and respect for the cease-fire conditions. After the Tashkent Declaration another period of relative peace ensued.