(This piece comes from Project Syndicate. The opinions expressed are the author’s own)

Next month, India will complete its marathon election. A new government is expected to assume power at the end of May, and, if the polls prove correct, the Bharatiya Janata Party (BJP), which has named Narendra Modi as its prime ministerial candidate, will lead that government.

With India’s sluggish economic performance having rightly dominated the campaign, the question of what foreign policy the new government should pursue remains unanswered. Whatever the specifics, one imperative is clear: India must move beyond its allegiance to the Non-Aligned Movement (NAM).

The muddle that NAM diplomacy causes is perhaps best reflected in the Congress-led Indian government’s recent quasi-endorsement of Russia’s annexation of Crimea. Prime Minister Manmohan Singh and his government appear to have overlooked that China covets Indian territory and may thus be pleased that Russia has set a precedent for a powerful country to thumb its nose at international law and seize part of a neighboring country.

It is as if Indian foreign policy has been on autopilot since the 1980’s, when the government almost always adopted a pro-Russia stance.

The reality is that the NAM was never particularly effective at keeping India out of conflict, as the wars with China and Pakistan in 1962, 1965, and 1971 clearly demonstrated. In 1971, it was the Soviet Union’s support, rather than that of the NAM, that helped India to overcome the refugee crisis caused by Pakistan’s genocide in Bangladesh. Likewise, in 1999, India relied on American intervention to pressure Pakistan to end its aggression around the Himalayan town of Kargil.

Given this track record, how can old NAM diplomacy be expected to resolve the foreign-policy challenges that India faces, especially at a time when China and Pakistan are uniting to confront India?

The most pressing threat to India’s peace lies on its borders, especially the Himalayan border with China, the world’s longest disputed frontier – not least because uncertainty there facilitates inflows of terrorist forces bent on undermining India’s territorial integrity and sowing seeds of ethnic and religious conflict. While India has fought terrorism longer than any other country, the problem now affects the entire region, including Afghanistan, China, and Pakistan.

With Islamist terrorism spilling across its borders, India can no longer leave the turmoil in the Arab world to others to manage. Instead, it must take an active role in efforts to contain and ameliorate it – and that means developing new strategic alliances. Just as terrorists have created a kind of multilateral offensive, the countries that they threaten must construct a multilateral defense.

For starters, India should welcome – and foster – the thaw in relations between the US and Iran. Given that both countries are friends of India, and that all three share many strategic interests, a nimble Indian government has an opening to help facilitate a diplomatic rapprochement.

Meanwhile, a strategic alliance that supports peace in the Indian and Pacific Ocean region – for example, among India, the US, Japan, South Korea, Australia, and Vietnam – could be shaped quietly and calmly, without impeding any of the partners’ ability to establish economic ties with third parties, including China. India must also work vigorously to renew its relationships in Southeast Asia, where it risks abandoning the field to China.

At the same time, India must develop a strategic understanding with China, Russia, and the US concerning the jihadist explosion in Pakistan, Afghanistan, and the Central Asian countries. Such an understanding would, of course, have rough edges, with India, Russia, and China simultaneously competing for influence in Afghanistan. Nonetheless, some sort of accord, whatever its gritty nuances, is both possible and necessary, given that preventing Afghanistan from relapsing into civil war or again becoming an export base for terrorism is in everyone’s interest, including Pakistan’s.

India’s next government must also nurture the country’s partnership with the US. Until recently, the bilateral relationship has tended to be guided by a transatlantic, trans-Eurasian perspective, while ignoring the trans-Pacific option. But India, blocked to its west by Pakistan, is increasingly looking east for trade and strategic partnerships. As it explores these possibilities, it can work with the US to shape a common perspective in Central Asia.

As for Pakistan, India’s NAM-driven inaction has given its nemesis the upper hand in isolating India strategically. This is extraordinary, given that Pakistan is the region’s principal protector of terrorist forces – and has now, sadly, become the victim of its home-grown militants.

America’s withdrawal from Afghanistan will, in the short run, be a setback for the entire region. But, even as the US withdraws its infantry, it cannot ignore the threat that Islamist terror poses to America. That is why the US will increasingly depend on countries like India to ensure the success of its global anti-terror policy.

But the value of the bilateral relationship extends far beyond the war on terror. The US and India must also establish clear channels for technology transfer – military, industrial, and scientific, including with regard to space.

Any forward movement in US-India cooperation must be characterized by care and respect, with objectives that are unambiguous, practical, and achievable. If both governments devote the necessary time and energy to each other, they can create a partnership between the world’s two largest democracies capable of playing a key stabilizing role in South Asia and beyond.