Border tensions between Pakistan and Afghanistan have risen since the Taliban seized power last year, with Islamabad claiming armed groups are carrying out regular attacks from Afghan soil.
Pakistan has called on the Taliban government in Kabul to take "stern actions" against attacks on the country launched from inside Afghanistan.
Islamabad's statement on Sunday comes a day after alleged rocket strikes by the Pakistani military killed six Afghans.
"Pakistan, once again, strongly condemns terrorists operating with impunity from Afghan soil to carry out activities in Pakistan," the foreign ministry said.
"Pakistan requests the sovereign Government of Afghanistan to secure Pak-Afghan Border region and take stern actions against the individuals involved in terrorist activities in Pakistan."
Fresh tension erupted after five children and a woman were killed in Afghanistan's eastern province of Kunar on Saturday in alleged rocket attacks that Afghan officials blamed on the Pakistani military.
While the Pakistani military has not confirmed whether it carried out the assault, Islamabad insisted it was facing continuous "terrorist" attacks from across the border.
Seven Pakistani soldiers were killed in North Waziristan district on Thursday by "terrorists operating from Afghanistan", the foreign ministry said.
"Unfortunately, elements of banned terrorist groups in the border region, including TTP (Tehrik-i-Taliban Pakistan), have continued to attack Pakistan's border security posts, resulting in the martyrdom of several Pakistani troops."
Afghanistan's Taliban government meanwhile warned Pakistan after Saturday's rocket attack.
"This is a cruelty and it is paving the way for enmity between Afghanistan and Pakistan," Taliban government spokesperson Zabihullah Mujahid said late on Saturday.
"The Pakistani side should know that if a war starts it will not be in the interest of any side."
The Taliban deny harbouring Pakistani militants, but is also infuriated by a fence Islamabad is erecting along their 2,700-kilometre (1,600-mile) border.
Areas along the border have long been a stronghold for militant groups such as the TTP, which operates across the porous frontier with Afghanistan.
The Afghan Taliban and the TTP are separate groups in both countries.
Thousands of people usually cross the border daily, including traders, Afghans seeking medical treatment in Pakistan, and people visiting relatives.