Chief of Army Staff (COAS) General Qamar Javed Bajwa on Monday warned that "hostile agencies from abroad are trying to destabilise our country", days after a cross-border attack on a checkpost near the Rajgal Valley border martyred one soldier, the army's media wing said in a press release.

"They [hostile agencies] fear the Army being a hurdle to achieving their nefarious designs," Gen Bajwa said during a visit to the family of Lt Arsalan Alam, the 22-year-old martyred soldier, according to an Inter-Services Public Relations (ISPR) handout.

The army chief said the armed forces would continue to perform in the country's best interests and stand by the nation against all challenges, the handout read.

"Pakistan's enemy is our enemy. Use of force is the prerogative of the state alone," he said, according to ISPR.

The army chief vowed to restore peace and rule of law "whatever sacrifices it may cost."

During his visit to Lt Alam's family home in Murree, the army chief paid tribute to the soldier and offered prayers for him, the ISPR said.

He also interacted with his family and said that the army and nation are proud of their martyrs for their sacrifices, ISPR said.

"No power can harm us... [as long as] we have such valiant sons of the soil and their brave parents in Pakistan," he added.

The Pakistan Army recently concluded Operation Khyber IV in the Rajgal valley and declared that the area was cleared off terrorists.

However, Director General ISPR, Major Asif Ghafoor had said during a press conference earlier this year that the army cannot carry out operations against terror elements present on Afghan soil.

"We took action in the border belt area at the cost of certain reservations from Afghanistan; but we cannot take action against terrorist infrastructure deep inside Afghanistan as a responsible country, as it is a sovereign country and has their own force, and the Resolute Support mission is also there," he had said.

The latest cross-border attack near the Afghan border comes as Prime Minister Shahid Khaqan Abbasi told the United Nations General Assembly (UNGA) that Pakistan refused to be a “scapegoat” for Afghanistan's bloodshed or to fight wars for others.

“Having suffered and sacrificed so much due to our role in the global counter-terrorism campaign, it is especially galling for Pakistan to be blamed for the military or political stalemate in Afghanistan,” Abbasi had said last week.

“We are not prepared to be anyone's scapegoat,” he asserted.

“What Pakistan is not prepared to do is to fight the Afghan war on Pakistan's soil. Nor can we endorse any failed strategy that will prolong and intensify the suffering of the people of Afghanistan and Pakistan and other regional countries,” he explained.

Pakistan also maintains that Indian intelligence agencies have used Afghan soil to foment unrest and carry out subversive activities in various parts of the country.