India lost no time in sending aircraft to Kathmandu carrying disaster response forces, medical teams, food, medicines and rescue equipment. China promptly flew in rescue teams, sniffer dogs, medical equipment, tents, blankets and generators. Leaders of both the countries - Narendra Modi and Xi Jinping - were also quick to convey their condolences. "For many people of our country, Nepalis are our own people," said Mr Modi in his monthly radio show on Sunday.
The competition for influence in Nepal between the Asian giants is not new, but it appears to have escalated in recent years.
Nepal's ties with India run deep and are often, according to many, schizophrenic. Many in Nepal - including the Maoists - have criticised its "semi-colonial" relationship with India, spoken about Indian "expansionism" and pointed to how their impoverished country had become India's "bonded market". Indian traders have controlled much of the lucrative parts of Nepal's economy. Asymmetrical water sharing treaties, many argue, have allowed downstream irrigation benefits for India. Nepalese opposition parties, playing the nationalist card, have sometimes thrived on anti-India rhetoric; and Maoists have derided other mainstream parties as India's brokers.
On the other hand, Delhi is geographically, linguistically and culturally much closer to Nepal than China. The anti-India rhetoric softens when political parties come to power. "India has been a political player in Nepal as much as any Nepali political party," says Michael Hutt, professor of Nepali and Himalayan studies at the University of London.
Nepalese citizens continue to serve in the Gurkha regiment in Indian army; and Nepalese soldiers are trained in India. India also remains a main supplier of weapons to the Himalayan state. The fact that the two countries share an open border means that India's core interest in Nepal is security, writes Prashant Jha, in Battles of the New Republic: A Contemporary History of Nepal, an incisive account of its chequered recent history. "Delhi needs a friendly regime in Kathmandu to prevent China from gaining space at its expense."
So it is no surprise that India has rushed relief to its quake-ravaged neighbour. "Nepal is central to India. Nepal has a special place in Indian thinking. It cannot be compared to China. India's response to the earthquake would have been strong and one of a kind, anyway," says Harsh V Pant, professor of international relations at London's Kings College.
Yet, things may not be as simple.
China's influence in the region appears to be growing rapidly. Last year China overtook India as Nepal's biggest foreign investor, investing heavily, among other things, in roads, power plants, transport and infrastructure. Trade between the two countries is on an upswing. Beijing has not minced words in telling Kathmandu that it needs to tamp down on pro-Tibet activists on its soil. A 2013 Human Rights Watch report said Nepal "forcibly" returns to China many Tibetans arrested at the border in contravention of rules. One report said Taiwan had been asked not to participate in the quake relief effort, although it is not clear whether China had anything to do with it. "Nepal has also become smarter and learnt to leverage both the Asian giants to its benefits," says Mr Pant.
Is China's growing role in Nepal making India skittish? Prime Minister Narendra Modi has made the neighbourhood his foreign policy priority and sphere of influence. India, clearly, wants to minimise Chinese influence in the neighbourhood. No wonder then that the pace and scale with which Mr Modi reacted to the tragedy was rather unprecedented. "There is a feeling in India that Nepal cannot be allowed to go China's way," says Mr Pant. "There is a feeling that China has made too many inroads into Nepal."
The alacrity with which India and China have reacted to the massive earthquake in Nepal again demonstrates how the two Asian giants continue to vie for influence in the tiny, landlocked Himalayan country.