Mamta looked out at the road ahead, barely visible in the night, and a dark thought crossed her mind: what if she and her family could not make the journey back to their village? What if her four children, including her eight-year-old disabled son, Sumit, heavy in her arms, died here on the side of the road?

“The road seemed endless, we had no money for food and my children just took short breaks sleeping on the ground,” she said. But gritting her teeth and pushing hunger and exhaustion away, Mamta kept on walking.

It would take her six-person family almost five days on foot to make the 125-mile journey from Gurgaon, a satellite city to the capital, Delhi, to their village, Sidamai in Uttar Pradesh, as part of an exodus of millions of migrant workers and families last week unlike anything seen in India since partition.

It followed the announcement last Tuesday night by the prime minister, Narendra Modi, that for the next 21 days the entire country of 1.3 billion people would be under lockdown to prevent the spread of coronavirus. Shops, factories and restaurants would all be shut and people would be confined to their homes for all but essential activities.

While it was met with approval by experts and health professionals, the lockdown has already proved catastrophic for India’s millions of migrant and daily wage workers, who earn their salary hundreds or sometimes thousands of miles away from home and live a hand-to-mouth existence.

With no way to earn money and feed their families for at least three weeks, millions decided last week to head back to their villages in order to survive.

Play Video Coronavirus: 'each and every individual matters', says WHO director – video

With trains and most buses suspended and taxis unaffordable, walking was the only option for many, and the sides of the highways were soon lined with people, bags slung over their shoulders, many with nothing but flip-flops on their feet. More than 20 migrant labourers have died over the past few days as they try to walk back home.

Facebook Twitter Pinterest The nearly deserted streets of Mumbai, which has been emptied of many of its daily wage workers. Photograph: Divyakant Solanki/EPA

Mamta, 35, and her husband, both workers at automobile factories in Gurgaon that were shut during the lockdown, suddenly found themselves without a salary and no way to pay their rent or to buy food.

“To survive, we had to go back to my village; we had no choice,” she said. She described the five days that the family walked, starting out on Wednesday evening and finally arriving in Sidamai on Sunday afternoon, as “more terrible than anything I ever could have imagined”.

They had nothing to eat except a dozen puri, fried Indian bread, that she had prepared with leftover flour before they left. The children wore through their shoes and their legs swelled up, meaning they often burst into tears out of pain. The family walked through the night, only stopping for short one-hour breaks.

“The only thing that kept us moving was that we had nowhere else to go,” said Mamta. “But even though we have arrived in the village we have no money for food. I don’t know how we will survive. Hunger will kill us before coronavirus does.”

‘There was so much violence’

Fulendra Kumar is among those migrant workers still walking. He set out last week from the industrial city of Ludhiana in Punjab and has already travelled on bus and foot 750 miles over the past week to reach Bihar, but still has another 200 to go before his final destination: the village of Araria.

“I worked in a snack factory in Ludhiana, but after lockdown the factory closed down and we faced starvation as we didn’t have enough money,” said Kumar, speaking as he took a rest in the city of Patna.

Over the weekend, there were similar scenes of chaos at Delhi’s Anand Vihar bus station, as hundreds of thousands of migrant workers gathered in an attempt to get on one of the limited buses still running. The crush of human bodies was the antithesis of the social distancing ordered by Modi, and the police responded by beating up workers who tried to board the buses.

Facebook Twitter Pinterest Crowds try to board buses out of the capital, Delhi. Photograph: Getty Images

Among them was Rama, 45, a daily wage worker who usually polishes office floors, who was attempting to get back to his home village of Gorapur in Andhra Pradesh.

“My work has totally stopped so I have no money to survive and I have not eaten since yesterday, so that is why I needed to go back,” said Rama. “But I was not the only one. The bus station was full of people like me, desperate to get out, and it was like hell.

“There were crowds and everyone was being crushed and pulling each other out of the way, there was so much violence and police were charging at us with lathis [wooden rods].”

He added: “For buses that had seats [for] 100 people, 200 people would be trying to cram in, people were sitting on top of the bus and hanging out of the windows. We were all desperate to leave because we cannot survive in Delhi under this lockdown.”

Facebook Twitter Pinterest The daughter of a migrant worker sleeps on the road near India’s capital. Photograph: Adnan Abidi/Reuters

The crammed mass of people at Delhi’s bus stations and widespread migration of people across states and borders over the past few days has horrified India, both in terms of the hardships foisted on the already impoverished migrant workers and because it can only worsen the spread of coronavirus.

Currently there are about 1,000 known cases here, but testing remains low, and many suspect the real figure to be much higher. In a bid to stop people moving, on Sunday night the government ordered all state borders to be closed, and police began arresting those walking on the highways or who reached state borders on foot. Many migrants who did reach the Utter Pradesh border were also hosed down with a chemical solution by police.

In an effort to house the tens of thousand of returning migrants, schoolhouses and government buildings have now been turned into quarantine centres across the country. But in some places the situation has turned violent.

Last week, a 50-year-old shopkeeper was killed by a group of four migrant workers at Chak-Udaipur village in Jharkhand’s Palamu district. “The shopkeeper had objected to free movement by the migrant workers in the village but they turned furious and killed him,” said Palamu district’s superintendent, Ajay Linda.

Migrant workers who have made it to their villages have often found they are no longer welcome. In several villages in Bihar and Jharkhand, villagers put up barricades at the entry points and hung posters, warning the migrants against entering the village before a health check.

“We took this decision as outsiders’ entry to the village could put everyone’s life at risk,” said Umesh Singh, 60, a schoolteacher from the village of Baniya-Yadupur in Bihar. “This is very dangerous time and we can’t ignore this.”