Mr Modi, whose Bharatiya Janata Party or BJP is seen as the front-runner in the five-week election starting on April 7, has taken an aggressive tone against the two neighbouring nations. On the campaign trail, he has warned Beijing to shed its "mindset of expansionism" and in the past he has railed against Pakistan for attacks in India by militants based in that country.
"I swear in the name of the soil that I will protect this country," Mr Modi said at a rally in Arunachal Pradesh last month, a region claimed by China.
India, China and Pakistan are all nuclear powers. They are also jockeying to take positions in Afghanistan as Western troops start to withdraw from the war-torn nation after a 12-year insurgency.
India has fought three wars with Pakistan and had a 1962 border skirmish with China. It came close to a fourth war with Pakistan in 2001 but since then, its foreign policy has been mostly benign.
Mr Modi has painted the ruling Congress, which has been in power for more than 50 of the 67 years since the country became independent, as weak on national security. (Full coverage: India Votes 2014) However, India is one of the top buyers worldwide of military hardware, purchasing about $12.7 billion in arms during 2007-2011, according to the Stockholm International Peace Research Institute; everything from basic military goods to an aircraft carrier.
Mr Modi's two advisers said that while his foreign policy would be muscular, it would also aim to keep a lid on regional tensions to allow a focus on reviving the economy.
"Ours will be an economy-driven foreign policy and the whole idea is to build India's economy so solidly that you can deal with other countries on our own terms," said a strategist involved in formulating the BJP manifesto.
As Gujarat chief minister for more than a decade, Mr Modi has courted investment from China. As prime minister, the advisers say, he would seek to steer a course between defending India's security interests and growing business links with the world's second-biggest economy.
Mr Modi has never clearly spelled out his foreign policy vision, but he has praised former BJP prime minister Atal Bihari Vajpayee - who ordered a series of nuclear tests in 1998 - for adopting a strategy based on both 'shakti' and 'shanti', Sanskrit for power and peace.
"The Chinese will understand the new PM is not a wimp and they won't do anything adventurous," the BJP strategist said.
India says China has made hundreds of intrusions along their disputed border in recent years. China denies crossing into Indian territory. Adding to the disquiet are China's forays into the Indian Ocean and its involvement in building a string of ports stretching from Pakistan's Gwadar to Chittagong in Bangladesh.
The BJP wants a rapid naval build-up and a firmer response to border violations. It also plans to speed up construction of roads and communication lines along the land border to narrow the gap with China's infrastructure on the Tibetan plateau.
The advisers, who spoke on condition of anonymity because the BJP's manifesto is still under wraps, said Mr Modi would move quickly to lay out India's core security interests in its neighbourhood, replacing what they dismissed as a reactive policy under the Congress party.
Topping the list will be an early settlement of the border dispute with China, an assertion of India's primacy in the Indian Ocean, and a low tolerance of militancy that India believes is often backed by Pakistan.
"You will see a more nationalistic approach on issues relating to terrorism in our neighbourhood. It is a much more hard view of these things," said one of the advisers.
Outgoing Prime Minister Manmohan Singh has pushed for peace with Pakistan, and had hoped to visit his birthplace in Pakistan's Punjab province in a final gesture of reconciliation before leaving office.
But his efforts were stymied by opposition at home over Islamabad's failure to act against those responsible for masterminding the November 2008 attack on Mumbai in which 166 people were killed by 10 gunmen from Pakistan.
Rajiv Dogra, a former Indian consul-general to Pakistan, expects a more forceful policy under a BJP government, both because of domestic pressure and an uncertain regional environment as the United States pulls out troops from Afghanistan.
"So far there has been a consensus in India - irrespective of the complexion and change in government - on the broad foreign policy contours," he said. "But this time, if there is a change in government, I do expect a break from that tradition."