SRINAGAR, India — Two Indian soldiers were killed in firing by Pakistani troops along the highly militarized frontier that divides Kashmir between the two rivals, India's army said Tuesday.

Indian army spokesman Col. Nitin Joshi said Pakistani soldiers used mortars and automatic gunfire overnight to strike at Indian positions in Sunderbani sector along the Line of Control in violation of the 2003 cease-fire accord between the nuclear-armed neighbors.

Joshi called the Pakistani firing and shelling "unprovoked and indiscriminate" and said Indian soldiers retaliated "strongly and effectively."

Both countries regularly accuse each other of initiating border skirmishes leading to casualties on both sides.

In Pakistan, security officials said they responded to Indian fire after coming under attack.

Two security officials said Pakistani troops targeted an Indian post from which rockets were fired toward a Pakistani post in Kashmir.

The officials, speaking on condition of anonymity because they were not authorized to speak to the media, said there was no loss of life on the Pakistani side.

Also Tuesday, Pakistani Prime Minister Shahid Khaqan Abbasi met with U.N. Secretary-General Antonio Guterres on the sidelines of a conference in China and told him that "deliberate and unprovoked cease-fire violations by India" along the frontier "are moving toward a dangerous escalation."

"The situation can escalate dangerously if the Indian side does not put a stop to repeated violations," Abbasi told Guterres, according to an official statement.

The prime minister sought a "just and peaceful resolution of the dispute" in accordance with U.N. resolutions on Kashmir, it said.

India and Pakistan have a long history of bitter relations over Kashmir, a Himalayan territory claimed by both in its entirety. They have fought two of their three wars since 1947 over their competing claims to the region.

This year, soldiers from the two nations have been engaged in fierce border skirmishes along the rugged and mountainous Line of Control, as well as a lower-altitude 200-kilometer (125-mile) boundary separating Indian-controlled Kashmir and the Pakistani province of Punjab. The fighting sent thousands of border residents to temporary shelters for days.

Rebel groups demand that Kashmir be united under Pakistani rule or as an independent country.

India accuses Pakistan of arming and training anti-India rebels and helping them by providing gunfire as cover for incursions into the Indian-held side.

Pakistan denies this, saying it offers only moral and diplomatic support to the militants and to Kashmiris who oppose Indian rule.

Rebels have been fighting Indian rule since 1989. Nearly 70,000 people have been killed in the uprising and the ensuing Indian military crackdown.