Elisângela Ferreira, 36, Luiz da Silva, 42, Lisyane Soares, 39, Cristiane do Nascimento, 34, Carlos Cordeiro, 50, Veronica Cabral, 28, (face hidden), her baby Lidia and daughter Debora, 8, take part in an exercise class for obese people at the nonprofit GRACO on Nov. 17. (Dom Phillips/For The Washington Post)

Brazil has been bogged down in a recession for more than two years but one business is still growing.

Fast food.

And as it expands, so does the country’s obesity problem.

Brazil’s government won worldwide plaudits for bringing 36 million people out of poverty during 13 years of rule by the leftist Workers’ Party, which ended in August. As the economy boomed and consumer spending followed, some people even joined a lower-middle class which by 2014 had swelled to almost 60 percent of the population.

But the progress came at an unexpected cost: an explosion in the number of overweight people, who now account for 57 percent of Brazil’s population — with 1 in 5 obese.

Doctors, nutritionists and other specialists say the weight gain is particularly pronounced among Brazilians with low earnings — many of whom swapped precarious lives, with food often scarce, for better incomes and cheap, abundant junk food and processed food.

“These are people who spend a lot of time at work or on transport. They do not have money or conditions to do physical activity,” said João Regis, an endocrinologist at Rio’s Clementino Fraga Filho hospital, part of its federal university. “They are not educated about obesity.”

The rise in weight problems creates a huge burden for Brazil’s stretched public health system, which is grappling with escalating levels of diabetes, hypertension and heart disease.

Rising obesity is a global phenomenon, but it is increasingly affecting developing countries in Latin America and the Caribbean. The percentage of overweight Brazilians was already rising when Luiz Inácio Lula da Silva — known as Lula — became president in 2003, ushering in an era of prosperity. Since then it has kept climbing for men and rocketed more than 40 percent for women. One in 3 children are overweight.

In 1975, Brazil had the world’s ninth-largest population of underweight men. By 2014, it was ranked third globally for obese men, after China and the United States, according to a study in the Lancet, a British medical journal. Nearly 1 in 4 women are obese.

Rio bar owner Veronica Cabral, 28, weighs 368 pounds, and her 8-year-old daughter, Debora, is classified as “seriously obese.” Cabral grew up in a “very poor” family in Recife in Brazil’s northeast. But, she said, “We lived by the beach, we fished, we had a garden and vegetables and fruit in the yard.”

When she was 13, her mother moved her and her four siblings to Rio. Two years later Lula came to power, and the lives of millions of Brazilians like Veronica began to improve. As Brazil’s economy roared thanks to rising commodities prices, a new, lower-middle class was born and encouraged to spend with easy credit. Many Brazilians benefited from a welfare scheme for low-income women who agreed to send their children to school and get them vaccinated.

“Life started to get better,” Cabral said.

Everybody in her family got jobs. For Brazilians like her who had grown up with little money, grabbing fast food and a soda at a McDonald’s or a Brazilian burger chain like Bob’s was desirable and affordable.

“Everything we could not do in childhood we did as adults,” she said. “Eat what you want. You go to the mall, you go to McDonald’s, you go to Bob’s.”

Brazil’s fast-food market grew in value by 82 percent from 2008 through 2013. Even as the recession bit, the number of fast-food restaurants rose 11 percent in 2015. While Brazilians’ incomes might have been dropping, they clung to their habits.

Cabral weighed 483 pounds when she first sought help at Rio’s nonprofit Group for the Rescue of Self-Esteem and Citizenship of the Obese — GRACO, in its Portuguese acronym. The group was founded in 2002 and offers free low-fat lunches, nutrition advice and physical education to about 200 people a month.

“Most of the time, these are people from low incomes,” said Rosimere da Silva, the founder.

Michele Lessa, general coordinator of nutrition at Brazil’s Ministry of Health, said the rise in obesity is due to growing consumption of junk food and processed food, an increasingly sedentary lifestyle, and the rising popularity of eating out rather than cooking at home.

The government has launched campaigns encouraging a healthier diet, financed exercise spaces in Brazilian towns, and encouraged more nutritious meals in school cafeterias. Recent figures suggest the growth of obesity may have slowed, Lessa said.

Cintia Cercato, an endocrinologist and president of the Brazilian Association for the Study of Obesity and Metabolic Syndrome, cited Brazilians’ move to urban areas — 86 percent live in cities — as a factor in the rise in obesity.

Many residents spend hours commuting to and from work on public transport, leaving less time for cooking or exercise.

Weekly street markets selling fresh produce are common in Brazilian cities. But snack joints, bars and street stalls selling fatty and processed food have proliferated — especially in low-income areas.

“When the lower classes have more purchasing power, they buy more of these processed foods,” Cercato said. “We know that urban areas have more obesity than rural areas.”

Fabio Gomes, a regional nutrition adviser for the Pan American Health Organization, blamed rising obesity across Latin America on fast-food giants that advertise aggressively to poorer, more susceptible people.

“They are less educated. They are vulnerable. They are more targeted as well because they are the largest population in these countries,” he said.

But activists are fighting back. Chile has implemented a law requiring health warnings on products high in sugar, sodium, calories or fats. In March, a Brazilian high court fined a cookie company $88,000 over a promotion in which children collected packets to buy a cheap Shrek watch.

Brazilian legislation prohibits advertising directed at children but is often ignored, said Ekaterine Karageorgiadis, a lawyer for Sao Paulo’s Alana Institute, a nonprofit group that first brought the case against the cookie company.

Government figures show obesity and excess weight are higher among citizens with less schooling. But Lessa, the health ministry official, noted that the epidemic affects Brazilians of all kinds.

“Obesity is democratic,” she said. “In recent years it is increasing more in poorer women, but it is a problem for all social classes in Brazil.”