Pakistan’s principal challenge lies within – defeating militancy and extremism, reviving the economy, resolving the energy crisis, educating its children and generating jobs to absorb the youth bulge in our population to avert a looming demographic disaster. The implications of all these problems for national security are apparent and can be ignored only at great peril.

Thus the strategic choices most consequential to Pakistan’s future concern these internal challenges. However, the challenge within is, in several ways, linked to Pakistan’s external environment, not least because a peaceful neighbourhood is crucial for Pakistan to focus unhindered and undistracted on solving deep-seated domestic problems.

Unfortunately, the tyranny of geography – a volatile neighbourhood and the main faultlines of geopolitics – and the burden of history have consistently put security at the top of Pakistan’s national agenda. It is no different today. At present Pakistan confronts a number of conventional and asymmetric, traditional and non-traditional challenges, hard and soft threats.

Externally, Pakistan’s twin challenges are its relations with India and Afghanistan. Both fronts have posed enduring security dilemmas. That is why Pakistan has, over the years, tried to avoid being confronted by a two-front situation.

Continuing tensions on the Line of Control and firing across the Working Boundary when the Pakistan Army is engaged on the western front and fighting militancy within its frontiers is but the latest manifestation of this security dilemma.

Before discussing these two relationships, the global environment needs to be considered. This is unsettled and in flux, with global power shifts reordering relationships across the world. The predominant trend is one of competition rather than cooperation. Great power geopolitics is witnessing a resurgence with competition intensifying between the major powers. Tension among major powers has, in fact, heightened the threat to global instability.

The three major global strategic developments of our time all have direct implications for Pakistan’s security. One, the spreading turmoil in the Middle East crystallised by the collapse of the post-World War order in the Arab world; two, the rise of China and the US pivot to Asia, which has opened a new Great Game on this continent; and three, renewed tensions between a resurgent Russia and the West, in what is being widely depicted as a new cold war.

The danger posed by Isis militants and their threat to seek allies and recruits in our region is one that Pakistan’s security planners take very seriously, even as the military offensive in North Waziristan and actions elsewhere in the country continue to shrink the space for terrorist groups.

America’s ‘pivot’ is also consequential to Pakistan’s security challenges. The pivot is widely seen here, as elsewhere in Asia, as aimed to contain China’s rise, even as America simultaneously pursues economic engagement with Beijing.

If this policy involves an endeavour to build India as a counterweight to China, this will have implications for South Asian stability. US plans to supply India advanced weaponry and technology will accentuate the growing conventional and strategic asymmetry between Pakistan and India and further undermine the delicate regional equilibrium.

Three, renewed tensions in Europe have already produced a closer relationship between Russia and China. Moscow is likely to adopt a more balanced posture in South Asia, opening the prospects of cooperation with Pakistan on a range of issues including Afghanistan, counterterrorism as well as defence and security.

This is already being reflected in greater diplomatic engagement between the two countries. The Russian defence minister’s recent visit to Pakistan indicates this as well as military and economic agreements forged by the two countries.

Pakistan faces a full spectrum of security challenges – terrorism and militancy, conventional threats and the imperative to ensure the credibility of its nuclear deterrence, which is India-specific.

In fact, the combination of terrorist and conventional challenges has meant Pakistani forces have had to simultaneously operate in two arenas – deal with external challenges and internal security. This dual engagement and deployment is reflected in the evolution of the doctrine of ‘comprehensive response’. Its operationalisation will however continue to pose tough choices and a constant review of strategy in response to a changing threat environment.

Countering militancy and violent extremism will remain the country’s overriding security goal. The present military campaign in North Waziristan follows two earlier, effective operations in South Waziristan and Swat, even though both have yet to complete their post-conflict stabilisation phase.

Aimed at dismantling the last hub of assorted militants in Fata, Zarb-e-Azb has already disrupted the terrorist network, destroyed its command and control, dismantled sanctuaries and established the state’s writ in the area cleared. However the operation is not yet over and confronts a tougher challenge ahead – clearing and taking control of Shawal valley.

Accompanied by less publicised, intelligence-led crackdowns in cities across the country – over 2,000 – the counterterrorism effort has put militants on the run and degraded their capabilities. But the threat from a syndicate of militant organisations, especially sectarian groups, is far from over.

The progress accomplished in the tribal areas will need to be sustained through the build and transfer phases by political reform and economic development. Much will also depend on cooperative counterterrorism actions by Afghanistan against those elements of the Tehreek-e-Taliban Pakistan and their associates who have sought sanctuaries across the Western border.

Pakistan’s response will also have to involve enhancing police and intelligence capacities and implementing a well-honed COIN strategy incorporating both kinetic and non-kinetic dimensions. The political, economic and social components of the counter-militancy strategy and coherent counter-narratives will also have to be articulated to match changes in the environment. This obviously requires a whole-of-government approach.

Geography, history, demography, religion and culture bind Pakistan and Afghanistan in a symbiotic relationship. For over 30 years Pakistan has borne the brunt of war and strife in Afghanistan. Even today, our country hosts over two million Afghan refugees, still the largest refugee presence in any one country in the world. Thus, Pakistan sees a peaceful, stable and united Afghanistan as being in its vital interest.

The advent of the new ‘national unity’ government in Kabul has created a fresh opportunity to revive the traditionally close relationship between Pakistan and Afghanistan. To this end Pakistan has conveyed to Kabul its readiness to assist in Afghanistan’s crucial post-2014 security, economic and political transitions.

A remarkably positive beginning has been made in reviving security and economic cooperation during President Ashraf Ghani’s recent visit to Pakistan. The political atmosphere changed dramatically and agreements were reached rapidly on a series of security, trade and development cooperation issues.

A key element of the security dialogue was the agreement not to allow each other’s territory to be used against the other. This involved Pakistan’s assurance that its ongoing operation in North Waziristan will make no distinction between militant groups and Afghanistan’s commitment to launch a campaign to expel Pakistani Taliban militants from Kunar where they have sought refuge.

Critical to prospects for Afghanistan’s stability will be efforts to achieve intra-Afghan reconciliation through peace talks with the armed opposition. President Ghani has made this a priority, and Pakistan can contribute meaningfully to this through an Afghan-led and owned process.

Pakistan is opposed to an armed takeover of power in Afghanistan and believes the only way to prevent an escalation of violence is by the early initiation of an intra-Afghan peace process. It is ready to help with this, as and when asked by Afghanistan to do so.

Islamabad’s expectations are that Kabul will, in turn, help in eliminating terrorist and insurgent threats to Pakistan emanating from Afghan territory. Islamabad is encouraged by President Ghani’s positive response. It is equally encouraged by his sensitivity to Pakistan’s concerns about India’s military role in Afghanistan.

While a promising start has been made to put Pakistan-Afghan relations on a better trajectory, there will inevitably be minefields ahead to navigate and confidence to be built to realise Prime Minister Nawaz Sharif’s vision of a “comprehensive and enduring partnership” between the two countries.