“I was promised everything under the sun,” Mr. Kalia said, referring to what Indian officials had told him. “But the picture became clear. They will summon the Pakistani high commissioner and give him a protest note. What importance will they give to that protest note? They have accepted it, they tear it, and they throw it out.”

Last year, The Hindu, a daily newspaper, printed internal government documents about a 2011 Indian Army raid called Operation Ginger, which was prompted by a Pakistani attack that had killed six Indian soldiers. Two of the dead were beheaded. The response came a month later: an ambush that left at least eight Pakistanis dead, three of them beheaded, according to documents cited by the newspaper.

The newspaper characterized the soldiers’ heads as “trophies.”

Beheading carries extraordinary emotional power for troops and has for many centuries, said Gen. Ved Prakash Malik, who was chief of the Indian Army during the Kargil conflict, a monthslong war the two countries fought along the Line of Control in 1999.

“You know, from the old wars, beheading is being considered, for the victors, a kind of a big thing they had done, and for the loser, a big insult that they have suffered,” he said.

Both the Pakistani and Indian Armies also were imprinted by the British military tradition, which puts a “massive emphasis on unit loyalty,” said Myra MacDonald, a journalist and author of “Defeat Is an Orphan: How Pakistan Lost the Great South Asian War.” According to the Indian Army, more than 4,500 Indian soldiers have been killed or injured along the Line of Control since 2001.

“If you see a couple of your mates killed, you certainly would be in a blind rage to avenge them,” she said. “This is what happens when men fight wars. On one hand, you know where the limits are, and on the other hand, you get this ground-level rage when you see the man next to you killed.”