Nepal has become the third country in India's immediate neighbourhood to see a violent uprising topple its government in recent years.

Prime Minister KP Sharma Oli resigned after more than 20 people died in clashes with police during anti-government demonstrations triggered by a social media ban.

A nationwide curfew is in place and the army is attempting to bring the situation under control after protesters stormed parliament and set fire to the homes of several politicians.

Many observers noted that the scenes in Kathmandu were reminiscent of the turmoil that gripped Bangladesh last year and Sri Lanka in 2022.

Though Bangladesh and Sri Lanka are also India's close neighbours in South Asia, Delhi's relationship with Kathmandu is special due to historic ties encompassing people-to-people connections, economic bonds, and strategic partnerships.

Nepal shares a largely open border of over 1,750 km (466 miles) with five Indian states: Uttarakhand, Uttar Pradesh, Sikkim, Bihar, and West Bengal.

Delhi is closely monitoring developments across the border, with Indian Prime Minister Narendra Modi swiftly reacting to the unfolding events.

The violence in Nepal is heart-rending. I am anguished that many young people have lost their lives, Modi posted on X.

He stressed that stability, peace and prosperity of Nepal are of utmost importance and appealed to all my brothers and sisters in Nepal to support peace. Modi also chaired an emergency security meeting with cabinet colleagues to discuss the concerning situation.

India's analysts indicate that the developments in Nepal caught Delhi off guard, similarly to the surprise uprising in Sri Lanka that forced the then president to flee the country. Any instability in Nepal poses a significant concern for India because of the country's strategic positioning.

The Western Theatre Command of China sits right across Nepal. The route to the Indo-Gangetic plains comes straight through Nepal, said retired Major General Ashok Mehta.

The unrest also affects the significant Nepalese diaspora in India, with approximately 3.5 million working or living in the country, reflecting the close family ties and cultural connections between the two populations. Individuals can travel between the countries freely due to an open border policy established in a treaty signed in 1950.

While a fragile sense of calm returned to Kathmandu, experts assert that India must navigate a complex diplomatic landscape due to widespread anger among the Nepalese populace towards major political parties that have ruled the country.

With both India and China competing for influence in Nepal, there are concerns of foreign meddling in the Himalayan nation's internal affairs. The future governance structure remains uncertain, and India aims to avoid a situation similar to that in Bangladesh following the ousting of its long-standing prime minister.

Oli's leadership transition is further complicated by the deepening political landscape, as India historically maintained cozy ties with the nation's three main political factions. Thus, engaging effectively with Nepal's next government while addressing local grievances is crucial.

With regional cooperation frameworks like SAARC stagnating, India faces significant challenges in managing political changes and instability on its periphery amidst a complex diplomatic atmosphere with neighboring countries, including ongoing tensions with Pakistan, Bangladesh, and Myanmar.