At present, the prime ministership is controlled by the pro-Indian Nepali Congress' candidate, Sher Bahadur Deuba. But with the victory of communist parties, the path has been cleared for another communist prime minister: Khadga Prasad Oli from the Communist Party of Nepal (Unified Marxist-Leninist), who previously held the office from October 2015 to August 2016.
After Oli departed office he was replaced by Pushpa Kamal Dahal, better known as "Prachanda," from the other communist party, the Communist Party of Nepal (Maoist-Centre). The two parties are now allied in a coalition government, with Oli's the senior partner.
The election has revealed "to what extent China will emerge as a viable alternative to India in Nepal's foreign policy," wrote analysts at Texas geopolitical research firm Stratfor in a commentary on the election. "One thing, however, is for certain: the rivalry between India and China for influence in Nepal will only ramp up."
Oli has previously slammed New Delhi and strengthened economic ties with Beijing. He is expected to re-award a $2.5 billion hydroelectric project to Chinese state consortium Gezhouba Group after Deuba cancelled it.
"For Kathmandu, there is greater room for maneuverability now between China and India," Harsh Pant, from the Indian think tank Observer Research Foundation, said to CNBC.
Sandwiched between the world's two most populous nations, Nepal has traditionally leaned closer to India on the geopolitical chessboard. Both nations have Hindu majorities and India has been a primary sponsor of the Nepalese government since the 1950s. India is also by far the largest trade partner of the mountainous country, making up over 50 percent of its import and export revenue.
But Nepal has also been the site of significant political and economic upheaval since the end of the 10-year civil war between monarchist groups and communist rebels in 2006. The communists entered the government and the monarchy was disestablished in favor of a democratic republic.
The ascension of the Maoist parties as one of the dominant political forces in Nepal has gradually caused a split to form in relations. In September 2015, Kathmandu accused New Delhi of creating a de facto undeclared blockade and fuel embargo, a charge that India has denied.
The alleged blockade, which came just months after a major earthquake, was named the cause of food, fuel and medicine shortages in Nepal. Stratfor wrote that the blockade "gave the government an incentive to diversify its relations through closer ties with China."
"In addition, the blockade caused many of the ruling elite in Kathmandu to cast a suspicious eye toward India, believing that the government in New Delhi tacitly supported the blockade."
Nepal was the site of devastating earthquakes in April 2015 that left around 9,000 people dead and 3.5 million homeless. The US Geological Survey estimated that the economic losses from the catastrophic quake were between 9 percent and a breathtaking 50 percent of Nepal's GDP.
Even when it was firmly in India's bloc, Nepal also tried to maintain friendly ties with China and stay out of the two much larger powers' numerous territorial disputes. But as China's foreign policy has become increasingly expansionist, more and more Nepalese have begun to see Beijing as a viable alternative.
China has also announced that Nepal will be a key part of their Belt and Road plan, a multi-billion dollar infrastructure network that is meant to increase foreign trade — and Chinese influence — throughout Asia.