The operation was aimed at preventing attacks being planned by Pakistan-based militants, a senior army official said.
He said "significant casualties have been caused to the terrorists and those who are trying to support them".
Pakistan denies India carried out any strikes and says two of its soldiers were killed in cross-border shelling.
"The notion of surgical strike linked to alleged terrorists' bases is an illusion being deliberately generated by India to create false effects," the Pakistani military said in a statement.
Pakistan said its soldiers died in "unprovoked" firing along the Line of Control (LoC) dividing the disputed region.
A territorial dispute between the two countries over Muslim-majority Kashmir has been running for decades, but tensions flared earlier this month after a militant attack on an Indian army base in Kashmir left 18 soldiers dead.
India blamed the attack on Pakistan, which denied the claim.
The operation is thought to have taken place in the early hours of Thursday. Later, Pakistan captured an Indian soldier in a village in the Goi sector on the Pakistani side of the LoC.
"One soldier from 37 Rashtriya Rifles with weapons has inadvertently crossed over to the Pakistan side of the Line of Control," said a statement from an Indian army official in Delhi.