Firing took place on the international border between Samba sector and Pakistan after an Indian soldier was killed in an attack blamed on Pakistan.
A ceasefire agreed in 2003 remains in place, but it is often violated.
In October, 16 people - nine Pakistanis and seven Indians - died when the two sides exchanged fire for several days.
"We have retaliated effectively... four Pakistani rangers have been killed along the international border in Samba sector [in Jammu region]," Reuters quoted BSF [Border Security Force] inspector general for Jammu region Rakesh Sharma as saying.
"As Pakistani rangers suffered casualties, they waved white flags, asking BSF to stop the firing so that they can lift the bodies of the dead men. We stopped the firing after their request," Mr Sharma added.
Pakistan said it had lodged a protest with the Indian high commissioner in Islamabad.
"The Indian deputy high commissioner was summoned to the ministry of foreign affairs to lodge a strong protest on the unprovoked firing," a Pakistani foreign office statement said.
On Thursday morning, India said Pakistani forces had fired at several Indian posts late in the night along the border.
Correspondents say 2014 saw an escalation in hostilities between the neighbours with some of the worst violence in a decade. Both sides have accused each other of starting hostilities.
Earlier in the summer, India's new Prime Minister Narendra Modi invited his Pakistani counterpart Nawaz Sharif to his inauguration and there were hopes that relations between Delhi and Islamabad would improve.
But ties have deteriorated since then with India cancelling scheduled talks with Pakistan in August and insisting that Delhi would "not tolerate acts of border violations by Pakistan" and that "ceasefire violations must stop".
Kashmir, claimed by both countries in its entirety, has been a flashpoint for more than 60 years and the South Asian rivals have fought two wars over the region.
Indian forces in Kashmir have killed four Pakistani troops on the border ending a year in which hostilities between the neighbours have escalated.