Four Pakistani soldiers were killed on Thursday in an exchange of fire with unknown attackers at the border with India in disputed Kashmir, the military said.

The soldiers were on a routine patrol along the Line of Control, the de facto border with India, when "unknown miscreants" fired at them, military spokesman Major General Athar Abbas told AFP.

"Two of our soldiers embraced martyrdom at the spot and two others injured later died at hospital," Abbas said, adding that three others suffered minor injuries.

The attackers were hiding in the thick forest in Hajera sector along the Line of Control on the Pakistani side of the border when they fired at the troops, he said.

Abbas said the soldiers returned fire and afterwards search parties were sent to hunt the attackers.

Nuclear-armed India and Pakistan have fought three wars, two over Kashmir. They each hold part of the Himalayan region but claim it in full.

Violence has sharply declined in Kashmir since they launched a peace process in 2004.

The insurgency on the Indian side of Kashmir has left more than 43,000 people dead since it started in 1989.