A staff member of the Nepal election office counts ballot boxes before distributing them for the second round of the general election in Kathmandu, Nepal, on Nov. 28. (Shresth/Epa-Efe/Rex/Shutterstock)

Nepal will vote Thursday in a landmark election that will be closely watched by neighboring India and China, each hoping for a win for their domestic allies in the small Himalayan nation. 

The national election comes as China is expanding its influence across Asia, including by ramping up investments in Nepal — a development that analysts say has rattled India, long the dominant Asian power in the country.

"Nepal has been liberated from dependency on only one neighbor," Left Alliance leader Khadga Prasad Sharma Oli said to a cheering crowd at a recent campaign rally in the city of Pokhara. 

The Left Alliance has campaigned on a call to counter India's dominance in Nepal with Chinese power. On the other side, incumbent Prime Minister Sher Bahadur Deuba, who is widely thought to be pro-India, has called for balancing Indian and Chinese power.  

India's influence in Nepal was unrivaled for decades. The countries share an open border, thriving trade links and common religions and customs. But in the past several years, China has redoubled investments in Nepal, building up infrastructure that could increase trade between the two countries, and making plans to expand Nepal's vast untapped hydropower infrastructure, which could yield large returns — and displace India's dominance here. 

Chinese investors have built roads, hospitals, colleges and malls and are drawing up plans to set up rail links and power transmission lines. At Kathmandu's international airport, incoming travelers are greeted by a large advertisement of a "Made in China" mall that sells everything from rice cookers to doormats. 

Work is underway at a construction site operated by China’s Shanghai Construction Group in the Kalanki Chowk area of Kathmandu on Nov. 1. (Sara Hylton/Bloomberg)

In Pokhara, a tourist hotspot in central Nepal, China is helping build a new airport, a huge development for the small landlocked country of 29 million. Ministerial visits between Kathmandu and Beijing have increased in the last two years, and scholarships and exchanges to China have created new opportunities for young Nepalis. 

"China has been flooding Nepal with investment," said Constantino Xavier, an analyst at Carnegie India. "That's a big game-changing development. For the first time really, in the history of the country, China is giving Nepal an alternative to India."

The option of a second friendly neighborhood giant gives Nepal a bargaining chip to resist India's dominance in the country — a prospect that puts new emphasis on Nepali sovereignty. In election rhetoric, this new focus on sovereignty is expressed in nationalistic, anti-India terms: restoring Nepal to a time before foreign countries dominated internal politics.

A new emphasis on political independence is increasingly important to Nepalis, said Kathmandu-based political analyst Achyut Wagle. "The popular definition of nationalism in Nepal is remaining interconnected with India and China but retaining political sovereignty," he said. 

For some voters, the rhetoric of restoring Nepal to past glory resonates. 

"I think the party I feel like voting [for] is popular because it strongly claims Nepal as a nation that is capable of bringing those golden days of Nepal back, where Nepal stood economically, socially and politically strong without aid dependency," said Jyoti Singh Bhandari, a lawyer who will cast her ballot Thursday. 

Workers construct a road at a site run by a Chinese company in Kathmandu. Chinese investment in Nepal has surpassed India’s. (Sara Hylton/Bloomberg)

For Nepalis, this election marks a pivotal moment in the tempestuous transition from monarchy to republic. Nepal has changed governments 26 times in the past 28 years. Many hope this election will bring political stability and much-needed development to the country, which ranks among the poorest in the world. 

A devastating earthquake struck Nepal in 2015, killing around 9,000 people and leaving tens of thousands homeless. In the aftermath of the quake, India criticized a new constitution that diluted powers for New Delhi's allies in Nepal. Then Indian trucks carrying food and fuel stopped crossing Nepal's border. India said the trucks could not pass because border protests caused security issues, but many Nepalis believe the country deliberately imposed a blockade to strong-arm politicians into changing the constitution. The Indian government denies that a blockade was imposed.  

The blockade turned opinion against India, prompting some Nepali politicians to change their tune on foreign affairs. Oli, once known as the "Man of India " for his close links to New Delhi's establishment, became the country's most vocal critic. 

The Left Alliance, jointly led by Oli and Pushpa Kamal Dahal, the leader of the Maoist Communist Party of Nepal, has also pledged to renegotiate treaties with India and increase ties with China. Even other pro-India politicians, such as the incumbent prime minister, are now talking about a balancing act between Nepal's bordering behemoths.

Khadga Prasad Sharma Oli, former prime minister and co-leader of Nepal’s Left Alliance, waves to the crowd ahead of the upcoming second round of a general election in Kathmandu. (Shresth/Epa-Efe/Rex/Shutterstock)

For Nepalis, "India is seen as overtly trying to influence elections," said Akhilesh Upadhyay, editor in chief of the Kathmandu Post. "Many Nepalis resent that."

China, on the other hand, conducts diplomacy behind closed doors, analysts said, and lavishes Nepal with desperately needed infrastructure investments. 

"India's traditional strategy to play politics in Kathmandu, by facilitating the creation of favorable coalition governments, is becoming increasingly redundant," said Xavier, the Carnegie India analyst. "China's inroads have made New Delhi realize the urgency of delivering more, better and faster on economic assistance and connectivity. There are no Indian passenger trains to Nepal, not even up the hills to Kathmandu, and meanwhile China is doing feasibility studies for a railway across the Himalayan mountains."

Despite strong trading ties, India and China spar over borders and compete for strategic control in Asia. Many issues divide the two countries: China has long been suspicious of India giving citizenship to Tibetan exiles, including the Dalai Lama, who the Chinese consider dangerous separatists. Border skirmishes flare up frequently, most recently in the Doklam region in the Himalayas when Indian troops moved in to stop Chinese road building in territory claimed by Bhutan, a close ally of India.

As China expands its influence in Nepal, analysts say India's leaders are worried the country's long-open land border with Nepal could be used to flood the country with Chinese exports. Guarding the border would strain military resources.

But Nepali politicians' embrace of China is a cautious one. The vast majority of Nepal's international trade still happens with India, and hundreds of thousands of Nepalis have gone to India for work or study. Even the Left Alliance manifesto, despite Oli's anti-India campaigning, promises to balance the roles of India and China in the country, Wagle said. 

For many Nepalis, this tug of war will weigh on their decisions as they vote Thursday. "We have been time and again hit by India," said Umesh Giri, who will cast his ballot in the country's mid-western district of Surkhet, "which is why it is important to try and approach different foreign relations."

Guru, 18, waits for a daily wage job under an election poster at a labor market in Kathmandu last month. Unemployment allowances for youth ages 18-25 has been one of Nepal’s election issues. (Shresth/Epa-Efe/Rex/Shutterstock)

Pradeep Bashyal contributed to this report.