New Delhi - Nawaz Sharif has "strongly condemned the unprovoked and naked aggression of Indian forces".
With a growing backlash in India over a deadly assault on one of its army bases in Kashmir earlier this month, a senior officer said the military had carried out "surgical strikes" along the unofficial border on Wednesday night.
News of the strikes was announced at a press conference by Lieutenant General Ranbir Singh, India's director-general of military operations.
"Some terrorist teams had positioned themselves at launchpads along the Line of Control," Singh said, describing the intelligence information as "very specific and credible".
"The Indian army conducted surgical strikes last night at these launchpads. Significant casualties have been caused to these terrorists and those who are trying to support them.
"The operations aimed at neutralising the terrorists have since ceased," he told a press conference in the Indian capital New Delhi.
Singh said the decision to launch the strikes had been taken after the military determined the launchpads had been set up with "an aim to carry out infiltration and terrorist strikes in Jammu and Kashmir and various other metros in our country."
"The operations were basically focused to ensure that these terrorists do not succeed in their design of infiltration and carrying out destruction and endangering the lives of citizens of our country."
He did not say whether the strikes had been carried out by the Indian air force or by ground troops.
But the Pakistani military rejected the idea that the strikes had been "surgical".
"There has been no surgical strike by India, instead there had been cross border fire initiated and conducted by India," it said in a statement.
"As per rules of engagement same was strongly and befittingly responded by Pakistani troops.
"The notion of surgical strike linked to alleged terrorists' bases is an illusion being deliberately generated by Indian to create false effects.
"This quest by Indian establishment to create media hype by rebranding cross border fire as surgical strike is fabrication of truth."
In a statement from his office, Sharif "strongly condemned the unprovoked and naked aggression of Indian forces".
The strikes come after the Indian government accused Pakistan-based militants of launching a deadly assault on an army base in Kashmir earlier this month that killed 18 soldiers.
India has also been on a diplomatic drive to isolate its arch rival and fellow nuclear power since the raid on September 18, the worst such attack in more than a decade.
On Tuesday it said Prime Minister Narendra Modi would not attend the South Asian Association for Regional Cooperation (SAARC) summit in Islamabad in November, in a major snub to its neighbour.
Kashmir has been divided between India and Pakistan since gaining independence from Britain seven decades ago.