Pakistani villagers in Kashmir rebuild damaged homes on Monday near the line separating Pakistani- and Indian-controlled zones. (Roshan Mughal/AP)

Heavy cross-border shelling in the disputed Kashmir region killed at least three Pakistani soldiers and seven Indian troops on Wednesday, Pakistan’s military said, in a sharp escalation of violence after a deadly ambush of three Indian soldiers. At least 10 civilians also were killed, witnesses said.

Pakistan’s military announced the death toll of both Pakistani and Indian forces. There was no word from India on the casualty count. A senior official with India’s paramilitary border forces said at least two personnel were injured.

The clashes were the latest in recent weeks along the heavily militarized border that divides Kashmir between Pakistan and India, and it raised the specter of more unrest between the two nuclear-armed rivals.

Later Wednesday, the directors general of the two militaries held talks, but it was unclear whether it could help ease tensions.

On Tuesday, the Indian army vowed that “retribution will be heavy” after three soldiers were ambushed and killed while on border patrol in the rugged Machil area on the Indian side of the border. The body of one of the soldiers was mutilated, military officials said.

“Condemn the cowardly and brutal killing of our soldiers, and mutilation of one of them. Salute these brave martyrs for their supreme sacrifice,” India’s defense minister, Manohar Parrikar, said in a tweet.

The Pakistani military said Wednesday that a “heavy exchange” of fire continued along the densely wooded and mountainous area that separates the Indian- and Pakistan-administered parts of Kashmir. Pakistani Prime Minister Nawaz Sharif decried the “continuing naked Indian aggression.”

Reports also indicated civilian deaths. Khawaja Basharat, 40, a truck driver in the Neelum Valley in Pakistan, said a mortar shell hit a bus, killing eight people and seriously wounding several.

Basharat said he heard a loud boom and rushed to the area to help the injured. Two other civilians were killed in an area further south Wednesday, witnesses said, including a teenage girl.

On the Indian-controlled side, Ghulam Ahmad Khan, 62, fled the border village of Gulud in late October after shelling killed his wife. He now lives with his daughter in Mendhar, a bit farther from the conflict area.

“We hope that the border firing stops and there are no more killings,’’ he said.

Relations between the two regional rivals have been tense since Pakistani militants attacked an Indian military outpost on Sept. 18, killing 19 Indian soldiers.

Eleven days later, India responded with what it described as “surgical strikes” on about a half-dozen sites in Pakistan that India described as staging grounds for militants waiting to cross the border. It is unclear how many of the alleged militants were killed in those raids; Pakistan has said only that two of its soldiers died in the attack.

Since then, cross-border skirmishes have become a near-daily occurrence in the contested area, with a dozen civilians and 17 security personnel estimated to have been killed in India and 30 civilians and 15 soldiers killed on the Pakistani side. Hundreds have been evacuated from villages in border areas, but many have remained behind to tend crops and livestock.

Diplomatic relations have been frosty, although Pakistan’s foreign affairs adviser, Sartaj Aziz, is to attend a two-day regional conference in Amritsar, India, beginning Dec. 3.

The two countries technically have a cease-fire agreement in place that dates to 2003, but officials said both sides regularly violate it.

Iqbal reported from Peshawar, Pakistan. Ishfaq Naseem in Srinagar, India, contributed to this report.