After he lost his job because of the coronavirus pandemic, Andres Hernandez suddenly found himself trying to survive on the streets with his wife and children, joining Mexico's growing ranks of homeless.

Their story is an increasingly common one in a country where poverty was rampant and many jobs were precarious even before the disease tore through the economy.

"It never crossed my mind that it would happen to me," Hernandez said. "I never thought of it and I ended up on the street."

Andres Hernandez became homeless after losing his job in a printing workshop and now lives in a room paid for by a homeless charity
Andres Hernandez became homeless after losing his job in a printing workshop and now lives in a room paid for by a homeless charity AFP / Alfredo ESTRELLA

The printing workshop where Hernandez was employed closed in March, and the 50-year-old had to move out of the room he rented near Mexico City.

He traveled with his family to the capital to look for work, initially sleeping in an area of a hospital where relatives of coronavirus patients spent the night.

But when they became scared of falling ill themselves, they moved to a nearby park where life became even tougher.

"Many lowlifes asked us (for money) for soda, but we didn't have any, and they got aggressive. They even stole my shoes," said Hernandez, who now wears women's sneakers that he was given.

Gabriel Contreras was thrown out of the hotel where he was staying because the manager feared he would bring home the virus
Gabriel Contreras was thrown out of the hotel where he was staying because the manager feared he would bring home the virus AFP / Alfredo ESTRELLA

He was later separated from his wife and children, who were taken by volunteers to a Christian shelter in the state of Hidalgo, north of the capital.

The coronavirus has killed more than 60,000 people in Mexico and ravaged its economy, the second-largest in Latin America.

Homeless people queue to receive food in Mexico City, where poverty is on the rise due to the coronavirus pandemic
Homeless people queue to receive food in Mexico City, where poverty is on the rise due to the coronavirus pandemic AFP / PEDRO PARDO

More than a million formal jobs have been wiped out, according to the Mexican Institute of Social Security.

The informal sector, which employs more than half of all workers, was hit even harder.

Around 12 million Mexicans stopped working in April after quarantine measures were introduced, official figures showed, although the situation has since improved as the economy gradually reopens.

The authorities estimated that 2.8 million people were out of work in June.

The pandemic has brought a growing number of beggers onto the streets of the Mexican capital
The pandemic has brought a growing number of beggers onto the streets of the Mexican capital AFP / ALFREDO ESTRELLA

Those with no safety net are in danger of falling into a new life for which they are unprepared.

"These stories are very hard," said Luis Enrique Hernandez, whose non-profit group El Caracol helps Mexico City's homeless.

People who are used to living on the street "learn to survive, but these people don't," he said.

Gabriel Contreras eked out a living helping on street stalls until the virus arrived and he was thrown out of the cheap hotel where he was staying.

"They told me that I couldn't live there anymore, because I might bring the virus back from the street," the 38-year-old said.

The economic crisis has taken a heavy toll on Mexico's poor, whose numbers are rapidly swelling.

The number of people living in poverty could climb to 62.2 million in 2020 -- almost half the population -- from 52.4 million in 2018, according to Mexico's National Council for the Evaluation of Social Development Policy.

Across the region, the pandemic is expected to impoverish 45 million people, raising the total to 231 million, around 37 percent of the population, according to the UN Economic Commission for Latin America.

While Hernandez is still unemployed, Contreras recently began working at a pizzeria that hires homeless people.

The two men sleep in a small room paid for by El Caracol in the working-class neighborhood of Nezahualcoyotl in the urban sprawl surrounding Mexico City.

Their neighbors, 35-year-old Claudia Garcia and her husband Alberto, used to sell ice creams, but their merchandise was confiscated due to a lack of permits a few months ago.

After the hostel where they were staying for 900 pesos (around $40) a week was closed because of the pandemic, they began living in a park, where someone tried to rape her.

"It was very difficult because one day you're sleeping in your bed and the next in the grass, in the street," she said.