New Delhi, India (BBN)-When Narendra Modi, 63, formally assumes the highest executive office in this simultaneously troubled, joyous, chaotic democracy of 1.25bn people, he will have to reconcile the ideological and the pragmatic.
His campaign has already achieved this. Throughout India's protracted five-week election, his Bharatiya Janata party (BJP) carefully blended promises of economic development – reforms, better services, more jobs and security for all – with references that were both religious and cultural, reports The Guardian.
These ideas were rarely explicitly articulated, but were nonetheless clear in Modi's choice of Varanasi, the holy city on the Ganges, as a seat to contest and the occasional deity that appeared, in contravention of electoral codes, behind the stage at meetings.
There were a series of statements by local BJP officials that appeared deliberately aimed at exploiting tensions between specific communities.
There were also more assertive statements directed at neighbours Pakistan – with which India has fought four wars – and China – with which India has had one conflict – and a promise that Modi in power would create an India that no one could talk down to on the international stage.
There was even an apparent threat to revise India's "no first strike" nuclear weapons policy .
All came together in the slogan "India First", which apparently resonated with 180 million people tired of an uninspiring and apparently uncertain Congress party-led coalition government and its dynastic leaders.
It got Modi to power, with the first majority seen in the Indian parliament for 30 years. But no one is quite sure what it means in terms of this huge and often fabulously insular country's relations with the region, and the rest of the world.
Modi is a polarising figure. He has emerged from, and is supported by, the Rashtriya Swayamsevak Sangh (RSS), the hardline Hindu nationalist organisation.
The BJP is intimately linked to the RSS, which has been banned three times by Indian authorities.
The RSS is deeply distrusting (and worse) of other religious minorities in India, suspicious of former colonial powers and the US, and committed to economic self-sufficiency for India.
And while his supporters see a man with an established record of honest, efficient and effective government, critics accuse Modi of harbouring deep sectarian prejudices and of allowing, or even encouraging, violence in which 1,000 people, largely Muslims, died while he was in power in Gujarat state in 2002.
Though a supreme court investigation has found insufficient evidence to support the charges – which Modi has always denied – concerns remain.
His foreign affairs in-tray is overflowing. There are major multilateral issues such as climate change to get to grips with.
An election is underway in Afghanistan, with 2014 a critical year for Indian interests there.
To the east, political strife in Bangladesh is subsiding but few believe any calm will last long.
India has proved unable to protect its businesses even in the tiny Maldives and in Burma. Further afield, the whole aftermath of the Arab Spring presents huge difficulties.
India needs lots of fossil fuels, and huge quantities of imported oil. Iran is a long-term ally but demanding.
The history of the Gujarat riots and the RSS connection is not going to simplify diplomacy anywhere in the Islamic world.
The relationship with Europeans is underperforming, with negotiations on a trade agreement taking so long they have become a stock joke of ambassador's receptions in Delhi.
British ministers keep turning up, keen to stress how much they admire all things Indian, especially large contracts.
With all his interactions internationally, there is one obvious questions: which will triumph? The job-creating, wealth-building pragmatist or the ideologue? The three big tests, experts agree, will be relations with Pakistan, the US and China.
Sitting in the back room of the BJP headquarters as the scale of Modi's win became clear, is Ravi Shankar Prasad, an ebullient lawyer turned politician whose vociferous style of argument is well-suited to the noisy shouting matches that pass as debates on Indian television.
Prasad, deputy leader of the BJP in India's upper house and a key campaign strategist, is in a very good mood.
India will be an "assertive power", he says, but one "with dignity, with responsibility and constitutional integrity".
However, Prasad explains, though India wants to dismantle the "wall of terrorism" that has separated Pakistan and India since partition, "the Pakistanis" need to be aware that "terrorism promoted from their soil" would no longer be tolerated.
The outgoing Congress government has struggled with the question of Pakistan.
Manmohan Singh, the technocrat prime minister, was born in the neighbouring country before partition.
But the attacks on Mumbai in 2008, when militants from the Pakistan-based Lashkar-e-Taiba group killed 166 people in India's commercial capital, sent a relationship that was already cool into deep freeze.
Some now say Modi, who has no need to prove his conservative credentials, could bring about a breakthrough. Pakistan, also a nuclear power, is currently run by a conservative, pro-business government under veteran politician and industrialist Nawaz Sharif.
His brother, Shahbaz, in a recent interview with the Guardian, blamed his nation's powerful military for the failure to generate greater commerce between the two nations.
Modi's commitment to economic development could see him push hard to broaden these commercial links – or even attempt a more radical gesture.
"It could be that Modi is Nixon in China for India and Pakistan," says Professor Ashutosh Varshney, of Brown University in the US.
"Hindu nationalist visionaries have typically been better in dealing with Pakistan."
Varshney's hopes are echoed by some Pakistani diplomats too.
The precedent is the previous BJP administration of Atal Bihari Vajpayee, who travelled to Pakistan in 1999 to sign a peace deal, a year after ordering nuclear tests that brought about international sanctions.
The other sticking point for Pakistan is the disputed territory of Kashmir, where a low-level separatist insurgency continues.
The BJP is committed to withdrawing the special constitutional provisions that guarantee Kashmir a degree of autonomy within India.
Concessions on this would be tough for Modi to envisage, let alone enact, experts say.
On top of that, the region is evolving rapidly as the US and other remaining international combat troops are withdrawn from Afghanistan by the end of this year.
Indian security officials fear this could result in a small army of unemployed militants who will head, or be directed, towards Kashmir or India itself, with the support of some elements of Pakistan's security establishment.
Even optimists such as Varshney admit that a major terrorist incident traced back to, or blamed on, Pakistan, could derail even the most committed effort to make peace.
"Another Mumbai [attack] – which is unlikely but not impossible – would create serious pressure," he says.
Rivalling the relationship with Pakistan for complexity and potential for misunderstanding is that with the US.
As protocol demands, Barack Obama called the Indian prime minister elect over the weekend to express his hope that his win would help "fulfil the extraordinary promise of the US-India strategic partnership".
Crucially, and here no one would have missed the significance, "the president invited Narendra Modi to visit Washington at a mutually agreeable time to further strengthen our bilateral relationship," said a government spokesperson.
This could occur as soon as the UN General Assembly in New York in September, when Modi could also visit Washington.
The visit is likely to be an extraordinary event with Modi – a teetotal, celibate, ascetic outsider who has shunned the sophisticated salons of India's power elite – suddenly pushed on to the world stage, and into a gruelling round of diplomatic engagements.
The public boilerplate, as it so often does, hides a difficult and often acrimonious relationship.
If he has been happy to welcome US investors to Gujarat over the 13 years he has governed the state, there has been little love lost between Modi and Washington.
The administration of President George W Bush denied Modi a visa in 2005 under a 1998 US law barring entry to foreigners who have committed "particularly severe violations of religious freedom".
A boycott by senior US officials was only lifted earlier this year, when the US ambassador to India finally travelled to Gandhinagar, the state capital of Gujarat, to meet its chief minister.
This, witnesses say, was a frosty occasion.
"I spoke to [Modi] a few years back about the boycott and whether he wanted me to push for it to be lifted," said one Modi aide, with international connections, last week.
"He said: 'No, let them come to me. They will,' and he was right. They did."
Though Rajnath Singh, the powerful BJP president who is also close to the RSS, told the Guardian as the campaign opened, of the party's wish for better relations with the US, there is much repair work to be done. Trade is still significant. Last month, Nisha Biswal, the top US diplomat for South Asia, said that the US wants bilateral trade of $500bn a year, up from about $100bn currently.
But, after an improvement a decade ago, and a controversial nuclear deal, relations between Delhi and Washington hit a new low five months ago when Devyani Khobragade, the Indian deputy consul general was arrested for visa fraud in New York, strip-searched and held in police custody.
She was eventually released and flew back to India but the affair prompted a vitriolic reaction to what Indians saw as disrespectful bullying by the "Ugly American".
This in turn prompted US commentators to accuse India of oversensitivity and behaviour unbecoming of an aspirant future power.
Still, some experts are optimistic. Michael Kugelman, at the Woodrow Wilson International Centre in Washington says Modi may get a warmer welcome than some predict.
He points out that the only US government agency to be critical of Modi for some time is the US Commission on International Religious Freedom, which warned of the impact a Modi-led government might have on minorities in India.
"Washington doesn't know him very well and I think that's the major concern. There was never any real hostility," Kugelman says.
Indeed, Modi's backstory, the former tea seller who "pulled himself up by his bootstraps and then embraced capitalism and the free market and became seen as a decisive and confident leader", has much appeal in the US.
"There are a lot of tensions in the relationship but they tend to revolve around economics and I could see him as a pro-investor and pro-trade leader saying: 'Let's try and make some progress'," Kugelman adds.
Perhaps the biggest challenge for Modi on the world stage will be China.
Few in India, where annual economic growth has dropped to less than 5% in recent years, now talk of catching up their neighbour.
Indeed, for Modi, China may appear to be less a rival than an opportunity. He has been there four times on official visits – more than any other country – and, aides say, admires what has been achieved in the country.
On his last five-day tour, Modi carried red business cards printed in Chinese.
Modi is also said to feel more at home among the technocrats of Beijing than in the west.
Critics frequently accuse him of authoritarian instincts in his career so far, of muzzling the press, of creating a "climate of fear" and of sidelining those who disagree with him.
If Washington sees a Horatio Alger, Beijing may see a figure who represents less an American dream and more an East Asian one.
But Modi will still come up against the fundamental tension between his nationalism and his desire to accelerate economic development. He may want to see Chinese investment in India's insufficient infrastructure – in trains, roads, power stations – but China has already proclaimed its ownership of the 21st century and Modi's victory speech pronouncement that the coming decades would constitute "India's century" is unlikely to have been well received in Beijing. Nor his attack, while on the campaign trail, on the Chinese "expansionist mindset".
The two countries frequently dispute their Himalayan border. "There is a [border] transgression every two days and some [such incidents] are critical," says Professor Srikanth Kondapalli, a China expert at Delhi's Jawaharlal Nehru University. "A BJP prime minister will have a hard job to explain to the people why border transgressions are happening and he cannot do anything about it. As a nationalist leader, this sovereignty dispute will really test Indo-Chinese relations."
Kondapalli's prediction is that, for at least the first years of his term in power, Modi will put development before ideology but warns, as others warn of Pakistan, that the big test will come when India is seen to be provoked.
This week, Modi will form his government and pick his foreign ministers.
His choice will be a key early indication of which way the man, who until two years ago was boycotted by the US and most of Europe, is leaning.
Will it be ideology or pragmatism? Nationalist pride and sovereignty first, or jobs and growth? Or perhaps a clever blending of both, like his campaign rhetoric?
Varshney believes Modi's landslide win will give him both a "long honeymoon" with voters and the legitimacy to hold the hardline nationalists at bay. He says: "So long as it is Modi's ambition to rise – not only on an Indian stage, but on a world stage – that drives him, he will discipline and restrain the extreme wing of the party. And as long as his driving force is the desire to reshape India and be remembered as the greatest prime minister since [independence leader] Jawaharlal Nehru, you will see a more pragmatic Modi."
But no one can be sure: either of Modi, or of his environment. In an unstable region, and in a vast country that is undergoing rapid social, political and cultural change, there are too many possibilities for anyone to be overly optimistic. The consensus among analysts is that it is not Modi's policy-making that could give cause for concern, but his potential response to a crisis – particularly if that crisis prompted a wave of nationalist indignation or anger.
After all, there are many in India who see Modi's victory as a sign of greater changes to come. One is Anuraj Dikshit, 40, a marketing executive who splits his time between Mumbai and Gurgaon.
He talks of not of India but Bharat, a Sanskrit-origin word describing a Hindu civilisation.
"This is not about warmongering but about this country's culture," he says. "India has been there since 1947. Bharat has been there since time immemorial. Now Bharat has come back, validated and endorsed by the voters of this country."