SRINAGAR, Kashmir — In his first public comments since India called off high-level talks with Pakistan last week, Prime Minister Narendra Modi said Islamabad had made a “spectacle” of the tentative peace process by meeting with separatist leaders from Kashmir, but added that India seeks “peaceful, friendly and cooperative ties” with its neighbor.

Responding to questions from journalists before a visit to Japan, Mr. Modi said that his first meeting with Prime Minister Nawaz Sharif of Pakistan in May had been “very good.”

“We, therefore, were disappointed that Pakistan sought to make a spectacle of these efforts and went ahead with talks with secessionist elements from Jammu and Kashmir in New Delhi just prior to the meeting of the foreign secretaries,” Mr. Modi said. He went on to say that “any meaningful bilateral dialogue necessarily requires an environment that is free from terrorism and violence.”

His remarks came as the two countries took steps to end two weeks of unusually heavy artillery fire between opposing forces along the border of India and Pakistan. Nightly mortar attacks have resulted in the deaths of two Indian and four Pakistani civilians since mid-August, but this week has brought a lull as commanders met to arrange further talks.