ISLAMABAD - Pakistan is defying calls for permanently opening the border with landlocked Afghanistan, asserting that terrorist attacks emanating from the neighboring country continue to hurt Pakistani citizens and security forces.

A string of deadly suicide bombings across Pakistan last month prompted authorities to close all regular crossings for movements of people and trade convoys across the largely porous frontier spanning roughly 2,600 kilometers.

The move also halted transit of containerized cargo, an economic lifeline of Afghanistan, which is dependent on Pakistani ports.

Pakistan's Foreign Ministry spokesman, Nafees Zakaria, reiterated Thursday that fugitives linked to the anti-state Pakistani Taliban and affiliates of Islamic State are plotting the violence from across the border, pointing to statements the militants have made taking credit for it.

"The decision of the closure of the border was actually the security context ... to protect our own citizens from the dastardly attacks which were continuing from the other side of the border by those terrorist groups who are enjoying sanctuaries in Afghanistan," Zakaria told a news conference in Islamabad.

The Pakistan military earlier this week alleged that militants staged cross-border raids on its outposts, killing five soldiers.

The Afghan government says it has nothing to do with the violence and has criticized Pakistan for shutting the border. Kabul has called for the border's immediate opening to legitimate migration and trade.

Independent critics and some Pakistani commentators have emphasized the need for resolving political differences through diplomatic channels, rather than resorting to punitive measures such as closing the border.

Zakaria said that Pakistan has taken steps to strengthen security and tighten monitoring on its side under a comprehensive border management plan, and is urging the Afghan government to do the same for effectively deterring movement of terrorists in both directions.

“This border management is the most important aspect as far as we are concerned to control the cross-border terrorism and movement of terrorists who are actually hurting both sides. This is in the interest of both the countries to cooperate and this is what we had been talking about with Afghanistan,” the spokesman maintained.

Pakistan opened the two main border crossings of Torkham and Chaman for 48 hours this week, allowing more than 50,000 stranded Afghans and Pakistanis into their respective countries. Pakistan has lately also increased pressure on more than two million registered and unregistered Afghan refugees to go back to their country, saying militants are using the displaced population for hiding and planing terrorist attacks.

Traders on both sides, particularly Afghans, say they are incurring demurrage charges because the border closure has led to a piling up of containerized cargo at Pakistan’s Karachi seaport on the Arabian Sea.

The fragile relationship between the two countries has long suffered setbacks because of Kabul’s allegations Islamabad harbors members of the Taliban insurgency and the Haqqani network blamed for deadly attacks in Afghanistan.

Under the border management plan, the Pakistani military intends to conduct phased fencing of the border with Afghanistan to try to plug so-called ratlines through the mountains between the two countries, which terrorists traditionally use for infiltration in both directions.