In early March, India's health minister Harsh Vardhan declared the country was "in the endgame" of the Covid-19 pandemic.
Mr Vardhan also lauded Prime Minister Narendra Modi's leadership as an "example to the world in international co-operation". From January onwards, India had begun shipping doses to foreign countries as part of its much-vaunted "vaccine diplomacy".
Mr Vardhan's unbridled optimism was based on a sharp drop in reported infections. Since a peak of more than 93,000 cases per day on average in mid-September, infections had steadily declined. By mid-February, India was counting an average of 11,000 cases a day. The seven-day rolling average of daily deaths from the disease had slid to below 100.
The euphoria at beating the virus had been building since late last year. Politicians, policy makers and parts of the media believed that India was truly out of the woods. In December, central bank officials announced that India was "bending the Covid infection curve". There was evidence, they said, in poetic terms, that the economy was "breaking out amidst winter's lengthening shadows towards a place in sunlight". Mr Modi was called a "vaccine guru".
At the end of February, India's election authorities announced key elections in five states where 186 million people were eligible to vote for 824 seats. Beginning 27 March, the polls would stretch over a month, and in the case of the state of West Bengal, be held in eight phases. Campaigning had begun in full swing, with no safety protocols and social distancing. In mid-March, the cricket board allowed more than 130,000 fans, mostly unmasked, to watch two international cricket games between India and England at the Narendra Modi stadium in Gujarat.
In less than a month, things began to unravel. India was in the grips of a devastating second wave of the virus and cities were facing fresh lockdowns. By mid-April, the country was averaging more than 100,000 cases a day. On Sunday, India recorded more than 270,000 cases and over 1,600 deaths, both new single-day records. If the runway infection was not checked, India could be recording more than 2,300 deaths every day by first week of June, according to a report by The Lancet Covid-19 Commission.
India is in now in the grips of a public health emergency. Social media feeds are full with videos of Covid funerals at crowded cemeteries, wailing relatives of the dead outside hospitals, long queues of ambulances carrying gasping patients, mortuaries overflowing with the dead, and patients, sometimes two to a bed, in corridors and lobbies of hospitals. There are frantic calls for help for beds, medicines, oxygen, essential drugs and tests. Drugs are being sold on the black market, and test results are taking days. "They didn't tell me for three hours that my child is dead," a dazed mother says in one video, sitting outside an ICU. Wails of another person outside the intensive care punctuate the silences.
Even India's mammoth vaccination effort was now struggling. In the beginning, the rollout had been embroiled in a controversy over the efficacy over a home-grown candidate. Even as the country ramped up the drive and administered more than 100 million doses by last week, vaccine shortages were being reported. Serum Institute of India, the country's - and the world's - biggest vaccine maker said it would not be able to ramp up supplies before June because it didn't have enough money to expand capacity. India placed a temporary hold on all exports of the Oxford-AstraZeneca coronavirus vaccine, because the doses were needed urgently at home, and allowed imports of foreign vaccines. Even oxygen was likely to be imported now to meet the surge in demand.
Meanwhile, almost in a parallel universe, away from the death and despair, the world's richest cricket tournament was being played behind closed doors every evening, and tens of thousands of people were following their leaders to election rallies and attending the Hindu festival of Kumbh Mela. "It is beyond surreal, what is happening," Shiv Visvanathan, a sociology professor, told me.
Experts believe the government appears to have completely dropped the ball on the second wave of infections that was about to hit India.
In mid-February, Tabassum Barnagarwala, a journalist with the Indian Express newspaper, flagged a seven-fold rise in new cases in parts of Maharashtra and reported that samples from the infected had been sent for genome sequencing to look for imported variants.
By the end of the month, the BBC reported the surge and asked whether India was facing a new Covid wave. "We really don't know what the cause of the surge is. What is worrying is that entire families are getting infected. This is a completely new trend," Dr Shyamsunder Nikam, civil surgeon of an affected district in Maharashtra, said at the time.
Experts now say that crowing about India's exceptionalism in "beating" the epidemic - younger population, native immunity, a largely rural population - and declaring victory on the virus turned out to be cruelly premature. "As is typical in India, official arrogance, hyper-nationalism, populism and an ample dose of bureaucratic incompetence have combined to create a crisis," said Mihir Sharma, a columnist for Bloomberg.
India's second wave was fuelled by people letting their guard down, attending weddings and social gatherings, and by mixed messaging from the government, allowing political rallies and religious gatherings. With infections declining, fewer people were taking the jabs, slowing down the vaccination drive, which had aimed to inoculate 250 million people by the end of July. In mid-February, Bhramar Mukherjee, a biostatistician at the University of Michigan, tweeted that India needed to "accelerate the vaccination drive while the case counts are low". Nobody quite took notice.
"There was a feeling of triumphalism," said K Srinath Reddy, the president of the Public Health Foundation of India. "Some felt we had achieved herd immunity. Everyone wanted to get back to work. This narrative fell on many receptive ears, and the few voices of caution were not heeded to," he said.
A second wave may have been inevitable, but India could have "postponed or delayed it and lessened its impact," said Gautam Menon, a professor of physics and biology. Like many other countries, India should have begun careful genomic surveillance in January to detect variants, Mr Menon said. Some of these variants could be driving the surge. "We learnt of new variants in February from reports from Maharashtra. This was initially denied by authorities," Mr Menon added. "This was a significant turning point."
What are the lessons of this public health crisis? For one, India should learn not to declare victory over the virus prematurely, and it should put a lid on triumphalism. People should also learn to adapt to short, local lockdowns in the event of the inevitable future spikes of infection. Most epidemiologists predict more waves, given that India is evidently still far away from reaching herd immunity and its vaccination rate remains slow.
"We cant freeze human life," Professor Reddy said. "If we can't physically distance in the crowded cities, we can at least make sure everyone wears a proper mask. And wear it properly. That's not a big ask."