In a hard-hitting speech, Modi said security forces will be given complete freedom to crack down on terrorism, and the "blood of the people is boiling".
"Our neighbouring country thinks such terror attacks can weaken us, but their plans will not materialise," he said at a function to flag off a new semi-high speed train from Delhi to Varanasi.
On Thursday, an explosives laden truck rammed into a CRPF convoy in Pulwama outside Srinagar killing at least 37 soldiers in one of the biggest terror attacks in recent years.
"My condolences to families of those martyred in the Pulwama attack, those behind the terror strike will pay a very heavy price," Modi said.
"I am thankful to all nations which condemned the Pulwama attack and urge them to come together to crush terrorism," the prime minister said.
READ: Pulwama terror attack: BJP cancels all political programmes