NEW DELHI — India's economic output shrank by nearly 24 percent in the most recent quarter, the worst contraction since records began and the largest such drop of any major economy during the coronavirus pandemic.

Gross domestic product plunged by 23.9 percent in the three months that ended in June compared with the same period a year earlier, according to official statistics released Monday.

The stunning decline reflects the economic toll of India’s nationwide lockdown and illustrates the depth of the challenge now facing Indian policymakers as they grapple with both a hobbled economy and a raging pandemic. India is adding the largest number of new coronavirus cases per day of any country in the world.

The Indian economy has not contracted for two consecutive quarters — the definition of a recession — in 40 years. Now the country appears certain to experience a recession and possibly one of unprecedented severity.

That kind of economic slump would be devastating in a country such as India, where 9 out of 10 workers have no job protections or unemployment insurance, leaving them with almost no safety net.

Mohammad Sadre Alam, 32, worked for years as a tailor with a small stall under a tree in India’s capital. His income vanished during the lockdown. After the restrictions were lifted, he tried to reopen for business, but there were no takers. “How do I work without customers?” he said. “Making clothes involves touch, so people are wary.”

Alam’s money ran out last month, and he returned to his village. “I want to come back to Delhi, but I don’t have the money for train fare,” he said. “I’m already in debt. Right now, everything is lost.”

A developing nation that is home to more than 1.3 billion people, India had the fastest-growing economy in the world until last year.

The pandemic changed everything. Now India’s economy is getting “disproportionately hit,” said Dharmakirti Joshi, chief economist at Crisil, a ratings agency in Mumbai owned by Standard & Poor’s.

Among the Group of 20 countries that have reported data for the second quarter, India recorded the sharpest contraction in GDP over the previous year. Britain was second, with a fall of 21.7 percent in economic output for the quarter compared with the same period in 2019.

Much of the economic pain stems from India’s lockdown, which was one of the strictest in the world. Beginning in late March, Indians were told to stay in their homes except for essential needs. All flights and train travel ceased.

Most economic activity ground to a halt. Maruti Suzuki, the country’s largest automaker, said that in April it sold no vehicles in India.

More than 100 million people lost their jobs or left the labor force. Workers fled cities on foot in a historic exodus, unable to survive without work.

Authorities began to ease restrictions in May, and most were officially lifted in June. While the unemployment rate has fallen to almost the level that prevailed before the lockdown, measures of economic activity remain weak. Electricity consumption is below where it was a year ago, according to a recent report from Goldman Sachs, while mobility data from Google showed a decline of 34 percent compared with 2019.

In eight core industries — including steel, cement, natural gas, and oil refining — output contracted by double-digit percentages in July over the previous year.

Agriculture — the sector that continues to employ the largest number of Indians — has proved somewhat resilient, Joshi noted. “Crops will still keep growing whether there is covid or not,” he said. “Anything that is not falling very sharply is a silver lining.”

Vipin Malhan, 50, runs a factory just outside Delhi that makes printed circuit boards for electronic goods. He said his sales are down 80 percent. “People are insecure about the future, as there is no vaccine yet,” Malhan said.

Consumers either do not have money to spend, or if they do, they are choosing to save it instead, since “they don’t know how many months they will have to bank on it,” he said.

Amandeep Kaur, 36, a senior customer associate at a technology company, lost her job this month. Her husband runs a ­travel agency, which is also ­struggling in the pandemic. Kaur said she had no idea whether she will be able to find work or how the couple will manage their expenses. “Hundreds of thousands of people are looking for jobs,” she said. “It’s a depressing situation.”

Even before the advent of the coronavirus, India’s economy was in a vulnerable spot. Economic growth had slowed markedly, and the financial system was hamstrung by bad loans. The challenge facing banks was “intractable,” Urjit Patel, the former governor of India’s central bank, said in a recent interview.

The government of Indian Prime Minister Narendra Modi announced a package to stimulate the economy. Experts say it falls well short of what other countries have done to resuscitate their economies and amounts to about 1 percent of GDP in direct spending.

Niha Masih and Taniya Dutta contributed to this report.