Making suo motu statements in both Houses of Parliament on the incident, Defence Minister A K Antony said the attack was carried out on the Indian side of the LoC.
An Indian Army patrol, comprising one Non-Commissioned Officer and five other ranks, was "ambushed on our side" of the LoC in Poonch sector of Jammu and Kashmir, he said in identical statements in the Lok Sabha and the Rajya Sabha.
"The ambush was carried out by approximately 20 heavily-armed terrorists along with persons dressed in Pakistan army uniform," he said.
"In the ensuing firefight, five Indian soldiers were martryred and one soldier was injured," he said.
Strongly condemning the "unprovoked incident", Antony said, "I assure the House that our army is fully ready to take all necessary steps to uphold the sanctity of the LoC."
He said the government of India has lodged a strong protest with the Pakistan government through diplomatic channels.
His statement came after members expressed anger over the incident and demanded to know how the government was responding to it.
Antony said the number of infiltration attempts from Pakistan have doubled this year in comparison to the corresponding period between January 1 and August 5.
There have also been 57 ceasefire violations this year, which is 80 per cent more than the violations last year during the same period, the defence minister said.
He said the Indian Army successfully eliminated 19 hardcore terrorists in July and August along the LoC and in the hinterland in Jammu and Kashmir.
The effective counter infiltration grid on the LoC has ensured that 17 infiltration bids were foiled this year, he said.
5 Indian soldiers killed in Pak ambush at LoC
Pakistan army denies cross-LoC firing
Making sense of nuisance along the LoC
LoC violation: Why India CANNOT remain silent
Exclusive: Salute that soldier at the LoC