Artillery fire and shelling from India targeted several Pakistani villages and struck a bus near the dividing line in the disputed Kashmir region, killing 12 civilians and wounding more than a dozen others, Pakistani officials said.

Hours later, Pakistan's military said three soldiers, including an army captain, were killed while responding to the Indian attack.

It said seven Indian soldiers were also "killed in retaliatory fire" but there was no confirmation on the casualties from India.

The deadly violence marks the latest escalation in the Himalayan region of Kashmir, which is divided between the two nuclear-armed neighbours and claimed by both in its entirety.

According to deputy commissioner Waheed Khan, an artillery shell hit a passenger bus in the Neelum Valley in the Pakistani part of Kashmir, killing 10 people - three died on the scene and seven later, at a hospital.

Another two civilians died when a mortar shell hit their house in the Nakyal sector in Kotli district, said a police official. The shelling sent residents fleeing in panic, he said.

At least 15 people were also wounded in the bus strike and elsewhere in the attacks. Pakistani foreign affairs adviser Sartaj Aziz said the country's cabinet expressed grave concern over the latest escalation.

Sardar Masood Khan, the president of the Pakistani-governed part of Kashmir, denounced "India's aggression" and appealed to the international community to take notice of India's ceasefire violations in Kashmir. He also urged the United Nations Military Observer Group for India and Pakistan, or UNMOGIP, to "investigate these incidents and assign responsibility for these violations of ceasefire".

Earlier, an army statement said Pakistani troops were firing back on Indian military positions. The statement also said that an ambulance, which had rushed to the scene of the attack, was fired upon by India.

Pakistani security officials said the fire forced Pakistani villagers with their families to take to field bunkers, built years ago for such attacks.

In India, army spokesman Colonel Nitin Joshi said an intense exchange of fire was under way between the two sides.

It came a day after Indian army spokesman Colonel Rajesh Kalia said attackers mutilated the body of one soldier in the Machil sector in Indian-controlled Kashmir. He did not specify if the attack was carried out by Pakistani soldiers or rebels fighting since 1989 against Indian rule in the region.

Reports of the soldier's mutilation have inflamed sentiments, which likely contributed to the retaliatory exchanges between Pakistan and India.

"Retribution will be heavy for this cowardly act," said an Indian army spokesman.

In the past, the Indian military has blamed a combination of the Pakistani army's border action team and militants for carrying out operations along the Line of Control, which separates the Pakistan and India-controlled parts of Kashmir.

Deadly exchanges in Kashmir have intensified in recent weeks. Tensions have escalated since militants attacked an Indian army base there in September. India said the militants were supported by Pakistan, charges denied by Islamabad.

Both sides accuse the other of initiating the firing along the volatile boundary. So far this week, at least 18 people, civilians and soldiers, have been killed on both sides.

Last week, the Pakistani army claimed to have shot down a small Indian drone in Kashmir, a day after the Pakistani navy claimed it had intercepted Indian submarines entering the country's territorial waters in the Arabian Sea.

Two of the three wars between India and Pakistan since 1947 have been fought over their competing claims to Kashmir.