At the Erasmo Meoz Hospital in Cucuta, Colombia, more Venezuelans are being born than Colombians. (Charlie Cordero for Project Hope)

Colombia granted citizenship Monday to more than 24,000 children born to Venezuelan migrants on its territory since 2015, as well as to all those who will be born in the next two years, in an effort to address a growing problem in one of the world’s largest refu­gee crises: undocumented babies.

“Today we can say, amid difficulties, that the way of xenophobia is not the right way,” President Iván Duque told an assembly of U.N. officials, representatives of other nongovernmental organizations and Colombian officials at the presidential palace. “In defense of brotherhood, we will attend to this situation.”

Most nations in the Americas confer citizenship on babies born on their territory automatically, but Colombia requires at least one parent to have legal residence. Duque’s decree loosens that standard, the latest move aimed at accommodating the continuing rush of refugees from neighboring Venezuela into this country.

More than 4 million have fled the hyperinflation, blackouts, and shortages of water, food and medicine of Venezuela under President Nicolás Maduro, according to the U.N. refu­gee agency. Nearly 1.5 million have ended up in Colombia.

Officials here say Duque’s decree will protect a generation of children.

“The Colombian government has been firm in its commitment to rise to the height of ethical responsibility and offer help to the Venezuelans who feel forced to leave their country,” Felipe Muñoz, appointed by Duque to manage the Venezuelan border, wrote in response to questions from The Washington Post. “Let’s remember that decades ago it was they who received us Colombians in their country, when the situation was inverse and it was us fleeing difficult local conditions.”

Poverty and conflict have displaced more people in the world today than at any time in human history. Some countries, including the United States, have responded by tightening borders and immigration policies. Amal de Chickera, co-director of the Institute on Statelessness and Inclusion in London, praised Colombia for taking the opposite approach.

“In the current global climate, to see Colombia actually going the other way and taking a decision to meet its obligations under international law, it’s incredibly heartening,” he said.

Nine-month-old Rossani Tua is now one of Colombia’s newest citizens.

Her parents, Nixon, 35, and Rossana, 33, traveled 10 hours by bus from their home in the northwestern state of Lara, Venezuela, in late 2017. Then they walked and hitchhiked to Bogota, the capital. They slept in a park for a time, then found shelter with a good Samaritan before eventually settling in a brick shack in La Magdalena, a bustling slum where people survive by collecting, sorting, cleaning and recycling the city’s garbage.

Rossana gave birth to Rossani in November. If she’d had a Colombian visa, the child would have been a citizen at birth. But because she has no nationality, Rossani’s parents have been unable to obtain the documentation, such as a national ID card or passport, that would enable her to access public services or travel.

“We have her practically in limbo,” said Rossana, holding the baby in the door of their small home. “She’s not Venezuelan or Colombian. She doesn’t have a right to anything. We don’t know what to do.”

Miriam Rivera is director of the Karol Wojtyla Foundation, an organization in Bogota that provides legal guidance to immigrants.

Not only will the decree benefit the children, she said, but it also will provide a path to citizenship for immigrant parents, who under Colombian law can earn nationality through their children.

Colombian Foreign Minister Carlos Holmes Trujillo said the measure will be reviewed in two years and could be prolonged.

Trujillo blamed the problem on “insuperable obstacles” created by the Venezuelan consular service to register the children for Venezuelan citizenship.

“Those children have a right to Venezuelan nationality,” he said. “But it’s been practically impossible.”

It’s the latest effort by the government here to accommodate the Venezuelan influx.

The country has loosened ID requirements for Venezuelans to enter, offered special residence and work permits to migrants, and opened public schools to their children.

The special relationship between the two countries goes back two centuries, leaders here often recount, when Simón Bolívar led a ragtag army from Venezuela to liberate Bogota from Spanish rule. For a time, they were both part of a single nation — Greater Colombia — that also included present-day Ecuador, Panama and parts of Brazil, Guyana and Peru.

More recently, tensions between a succession of center-right governments in Bogota and the socialist governments of Maduro and Hugo Chávez have been strained. But Duque still speaks of “our Venezuelan brothers and sisters” when addressing migration.

“Today we are giving a light of hope to thousands of kids and to thousands of families,” Duque said Monday. “We can show that in these moments of difficulty, fraternity prevails.”

Colombia’s policies on Venezuelan migrants have increasingly set it apart. Peru, with nearly 800,000 Venezuelans, and Chile and Ecuador, with nearly 300,000 each, have tightened restrictions on Venezuelans crossing their borders — although all grant birthright citizenship.

Humanitarian groups have applauded Colombia’s approach.

Marianne Menjivar, Colombia director for the International Rescue Committee, called the citizenship decree “a testament to Colombia’s pro-refugee stance, one which is increasingly under threat in the region and which deserves international support.”

She said other South American countries should prioritize registration and legal status for Venezuelan refugees, followed by programs for social and economic integration.

The Organization of American States last month predicted that the Venezuelan exodus would surpass the 6.7 million people who fled the Syrian civil war by 2020 to become the world’s largest.

The organization said international funding for the Venezuelan crisis amounts to about $100 per person displaced. For the Syrians, the figure peaked at $5,000.

That has left Colombia mostly on its own to foot the bill for the humanitarian crisis spilling over its border.

Duque called on other nations to offer more support.

“This requires that the world does not remain indifferent,” he said.

Children have proved costly, drawing state funding for birth services and space in public schools. Thousands of Venezuelan mothers have migrated to Colombia specifically to give birth.

For Osmari Cemplin, 18, delivering in her Venezuelan hometown of Maracaibo would have meant buying medical supplies she couldn’t afford, so her family pooled their money to help her move in with a cousin in Bogota, where she gave birth last year.

Her son, Yonaiker, has no citizenship. When he was 2 months old, he came down with a fever, and some months later, his face and eyes swelled up. But undocumented immigrants are eligible to receive only emergency treatment free, and the family couldn’t afford anything more.

“They said I’d have to bring her in almost dead to tend to her,” she said. “We all went home and cried.”

Maikely Rojas, 18, delivered Matias in Bogota two years ago. But she and her husband struggle to feed themselves, and their son wears clothing for a 6-month-old.

Rojas said that she has asked for nutritional assistance and pediatric care from state hospitals, but her son doesn’t qualify.

As a Colombian citizen, he will.