India and Pakistan have fought four wars since 1947 and had several crises that went to the brink of war. Both tested nuclear weapons in 1998. Now tensions are escalating between the two again.

It began in May, when a heavily armed squad of Pakistani terrorists from Lashkar e Tayyiba (Army of the Pure) attacked India’s consulate in Herat, in western Afghanistan. They planned to massacre Indian diplomats on the eve of the inauguration of India’s new Hindu nationalist prime minister, Narendra Modi. The consulate’s security forces killed the LeT terrorists first, preventing a crisis.

Since LeT is a proxy of Pakistan's military intelligence service known as the ISI, Indian intelligence officials assume the Herat attack was coordinated with higher-ups in Pakistan. They assume another LeT attack is only a matter of time. They are probably right on both counts.

This summer, clashes between Indian and Pakistani troops have escalated along the ceasefire line in Kashmir. Called “the Line of Control,” the Kashmiri front line this year has witnessed the worst exchanges of artillery and small arms fire in a decade, displacing hundreds of civilians on both sides. More than 20 have died in the crossfire already this month. Modi has ordered his army commanders to strike back hard at the Line of Control to demonstrate Indian resolve.

Although Modi made a big gesture in May when he invited his Pakistani counterpart, Nawaz Sharif, to his inauguration, since then Modi has canceled routine diplomatic talks with Pakistan on Kashmir and signaled a tough line toward terrorism. He also appointed a very experienced intelligence chief, Ajit Doval as his national security adviser. Doval is known as a hard-liner on terrorism—and on Pakistan.

Modi’s Bharatiya Janata Party strongly criticized his predecessor, Manmohan Singh, for what it saw as a weak response to LeT’s attack on Mumbai in 2008. No military action was taken after 10 LeT terrorists, armed and trained by the ISI, killed and wounded hundreds of innocents, including six American dead.

In 2001, a previous BJP government mobilized the Indian military for months after a Pakistan-based terror attack on the Indian parliament. The two countries were eyeball to eyeball in a tense standoff for almost a year. Two years before that, the two countries fought a war in Kashmir around the town of Kargil.

In the 1999 Kargil War, the Pakistani army crossed the LOC to seize mountain heights controlling a key highway in Kashmir. BJP Prime Minister Atal Vajpayee responded with airstrikes and ground forces. The Indian navy prepared to blockade Karachi, Pakistan’s major port and its critical choke point for importing oil. A blockade would have rapidly cut off Pakistan from oil supplies. The Indian navy was so eager to strike it had to be restrained by the high command.

The Pakistanis began losing the fight at Kargil. Then they put their nuclear forces on high alert. President Bill Clinton pressured Nawaz Sharif (the prime minister then and now) into backing down at a crucial summit at Blair House on July 4, 1999. If Clinton had not persuaded Sharif to withdraw behind the LOC, the war would have escalated further, perhaps to a nuclear exchange.

Kargil is a good paradigm for what a future crisis might look like. A BJP government is not likely to turn the other cheek. It cannot afford to let terror attacks go unpunished. That would encourage more.

The difference between the Kargil War and today is that both India and Pakistan now have far more nuclear weapons and delivery systems than 15 years ago. Pakistan is developing tactical nuclear weapons and has the fastest growing nuclear arsenal in the world. China provides Pakistan with its nuclear reactors. India has missiles that can reach all of Pakistan and even to Beijing. The escalatory ladder is far more terrifying than it was on the eve of the millennium.

For retreating in 1999, Sharif was overthrown in a coup by the army commander, Pervez Musharraf, who had planned the Kargil War. Now Musharraf is calling for Sharif to stand up to Modi and not be pushed around by India. The main opposition party leader, Bilawal Bhutto, has called for a tough line defending Kashmiri Muslim rights, promising to take “every inch” of Kashmir for Pakistan if he is elected prime minister in the future. Sharif is under pressure from another party leader, Imran Khan, to resign. The politics on both sides in South Asia leave little room for compromise or dialogue.

America is seen in South Asia as a power in decline, a perception fueled by the Afghan War. U.S. influence in New Delhi and Islamabad is low. A Clinton-like intervention to halt an escalation will be a tough act to follow. But the consequences of a nuclear exchange are almost too horrible to contemplate.