India’s prime minister, Narendra Modi, fumbled an early test of leadership this week when he canceled a high-level meeting with Pakistan. There are no two countries in the world that need to talk, and talk regularly, more than these nuclear-armed South Asian neighbors whose tensions must be carefully managed.

Mr. Modi raised expectations that he would work harder at resolving cross-border differences when he took the unorthodox step of inviting Pakistan’s prime minister, Nawaz Sharif, along with other regional leaders to his inauguration in May. The photo of the two men shaking hands came to symbolize the promise of that moment.

But that felicitous picture seemed a fading memory when, on Monday, India canceled foreign-secretary-level talks, which would have been the first in two years, that were scheduled to take place in Islamabad on Aug. 25. The proximate cause was India’s anger over a meeting that Pakistan’s ambassador to India held with a separatist leader from Kashmir, the disputed territory over which the two countries have fought three wars.

But there were other factors as well. Since Mr. Modi took office, violations of a 2003 cease-fire along the Line of Control, the India-Pakistan border in Kashmir, have grown more frequent, 30 by India’s count, 57 by Pakistan’s. Meanwhile, political rhetoric has grown more strident. In his toughest statement on Pakistan to date, Mr. Modi last week charged that Pakistan “has lost the strength to fight a conventional war but continues to engage in the proxy war of terrorism.” He even chose a politically charged venue for his remarks, the border town of Kargil, where the two sides fought in 1999.