LAHORE, Pakistan — India and Pakistan don’t have to be on the brink of war. Negotiators painstakingly put together a way out of the crisis and a road map for resolution of the Kashmir dispute in the mid-2000s, and we need to get back to it.

Kashmir has been disputed since 1947, with India holding around two-thirds and Pakistan one-third of its territory and both claiming all of it. The unresolved future of the largely Muslim region has led to three wars between the two countries, while frustration with Indian misrule in Indian-controlled Kashmir led to an insurgency supported by Pakistan in 1990.

India and Pakistan have alternated between phases of intense hostility and moments of calm since 1947. At various points, their leaders have — although unsuccessfully — sought to find ways to resolve their disputes. The insurgency in Kashmir was ebbing by the mid-2000s and India’s prime minister, Manmohan Singh, and Pakistan’s president, Pervez Musharraf, initiated a secret dialogue through trusted aides.

Indian and Pakistani envoys agreed to make the Line of Control, the heavily militarized border between the Indian and Pakistani-controlled portions of Kashmir, irrelevant by giving the Kashmiris the right to free movement and trade across the line. They agreed upon providing autonomy to Kashmir’s subregions and drawing down forces as violence receded. They also agreed to establish a body of Kashmiris, Indians and Pakistanis, vaguely described as a “joint mechanism,” to oversee the political and economic rights of the Kashmiris on both sides of the line.