Dharmendra Pareek, a top official with India's paramilitary force, said Indian forces retaliated after Pakistani troops fired guns and mortar rounds on more than a dozen Indian border posts and at least three villages in the Ranbir Singh Pura region.
Pareek said two Indian villagers were killed, including an 8-year-old boy. One Indian border guard and three civilians were wounded, but their injuries were not life-threatening, he said.
Television images showed Indian villagers taking shelter in bunkers.
The region is about 185 miles northwest of Srinagar, the main city in the Indian portion of Kashmir.
In Pakistan, a senior army officer said two villagers were killed when the Indian border security force "resorted to unprovoked firing" along the border near the city of Sialkot in the Pakistani portion of Kashmir.
The officer spoke on condition of anonymity because he was not authorized to speak to the media.
Indian Defense Minister Arun Jaitley said cease-fire violations by Pakistan had increased in the region, adding that "both the Indian army and the Border Security Force are fully vigilant and they effectively respond to each violation."
Kashmir is divided between India and Pakistan, and the rival neighbors claim the disputed Himalayan region in its entirety. They have fought three wars since gaining independence from Britain in 1947, two of them over Kashmir.
The two sides have largely followed a 2003 cease-fire accord, but sporadic violations have occurred.
Tensions have escalated in Kashmir since India earlier in the week called off diplomatic talks with Pakistan because the Pakistani ambassador in New Delhi met with separatist leaders from the disputed region.
India said the meeting undermined efforts to thaw relations between the nuclear-armed neighbors. But India has tolerated such meetings in the past, which suggests the country's new government is taking a hard line against Pakistan.
India accuses Pakistan of arming and training insurgent groups fighting for Kashmir's merger with Pakistan or independence from India since 1989. Pakistandenies the charge and says it offers only moral and diplomatic support to them.
Associated Press writer Munir Ahmed in Islamabad contributed to this report.