Pakistan's prime minister Nawaz Sharif expressed grief over the loss of lives and said it was "extremely unfortunate that Indian forces have continuously violated ceasefire agreement at the LoC in the recent days", PTI reported quoting Pakistan's Press Information Department.
"We are fully capable of defending our soil against any aggression," it quoted Sharif as saying.
Nawaz Sharif also claimed that the Indian Army was escalating tension to "uselessly divert" the world's attention from the "grave human rights situation" in Kashmir, PTI reported.
Pakistan army chief General Raheel Sharif said the army would "continue to respond effectively" to the firing and would "leave no stone unturned to defend motherland," PTI reported. The army chief was in Jhelum near Rawalpindi to attend the funeral of the dead soldiers.
Defence minister Khawaja Asif claimed the firing "would have surely killed Indian troops."
The Indian Army, however, alleged that the ceasefire violation was initiated by Pakistan.
"There was a brief ceasefire violation, initiated by Pakistan in Naushera sector, which was effectively retaliated last night," Indian Army spokesman in the Kashmir region, Col N N Joshi, told AFP.
Pakistan has summoned the Indian High Commissioner to protest the killing of the soldiers.
Pakistan daily Dawn reported that Pakistani authorities had last week lodged protests with India as well as with the UN military observers over targeting of civilians by the Indian Army.
The daily reported that the civilian death toll from Indian shelling has risen to at least 26 in the past few weeks.
Relations between the two countries deteriorated in September ever since Pakistani terrorists attacked an army post in Kashmir's Uri that claimed the lives of 19 soldiers. India retaliated with "surgical strikes" against terrorist launchpads across the LoC the same month.
Both countries have accused each other of violating the ceasefire multiple times ever since. India alleges there have been more that 60 ceasefire violations by Pakistani troops in Jammu and Kashmir since the strikes.
India earlier expelled a Pakistani High Commission official for alleged espionage. It also recalled three of its diplomats from the Indian High Commission in Islamabad last week after Pakistan revealed their identities and accused them of spying.
On November 9, the two countries summoned each other's deputy high commissioners to express concern over the ceasefire violations.
Tensions in Kashmir have been on the rise after popular militant leader Burhan Wani was shot dead by India's security forces in July. Nearly 90 people have been killed in clashes with security forces in Indian-administered Kashmir since then, AFP reports.