Manuel Barrios joined the battle against Russian forces in Ukraine because a bank threatened to repossess his home in Colombia. Luis Alejandro Herrera returned to the front to recover the savings he lost in a failed attempt to enter the United States through Mexico. Jhoan Cerón fought to provide for his toddler.

All three died in a war that their relatives said they knew or cared little about.

They were among hundreds of Colombian veterans who have volunteered to fight for Ukraine for the chance to make at least three times what they can earn at home.

“He said he was fighting a war in a country that wasn’t his because of the dire need,” said Mr. Barrios’s wife, Maria Cubillos.

The stories of Colombian volunteers highlight the shifting nature of the Ukraine war, which has transformed from a fast-moving struggle for national survival into a war of attrition. Heavy losses and stalemated battles are forcing both sides to look for new pools of fighters to replenish their ranks.

For Ukraine, the mainly Western foreign volunteers who arrived last year because of moral conviction, a search for adventure or a hatred of Russia are being supplemented by fighters from poorer nations that more closely resemble the legal definition of mercenaries — soldiers driven to foreign conflicts by financial gain.

“I would venture to say that not one Colombian has gone there to defend democracy,” said Cristian Pérez, who retired as a sniper in Colombia’s Army, worked under private security contracts abroad and is considering fighting in Ukraine. “I don’t believe they have even heard of Ukraine before the war. Everything comes down to economic motivations.”

Colombia offers fertile ground for recruiting because decades of struggle against Marxist insurgencies and drug cartels have left the country with the largest army in South America.

Still, foreign fighters make up a tiny fraction of Ukraine’s military.

Ukraine’s enemy, Russia, has had to put much greater emphasis on financial benefits including death insurance, and subsidized mortgages, to entice volunteers. And Russia has also exploited global economic upheaval to sign up fighters driven by financial need, including men with limited military experience from Central Asia, Nepal and Cuba.

And as the fighting settles into inconclusive, brutal trench warfare, material motivations are becoming even more prominent.

The Ukrainian military would not provide estimates for Colombian, or other foreign fighters in its ranks, citing operational security. Colombia’s government has also not provided any figures, emphasizing that the volunteers, while still citizens, no longer have ties to Colombian institutions.

Interviews with four Colombian volunteers who have served in Ukraine, as well as a review of audio and text messages sent by fighters there indicate that hundreds of Colombian volunteers are in Ukraine at any given time.

“We welcome help from every citizen of the world who is ready to fight evil,” said Oleksandr Shahuri, a spokesman for one of the main military units employing Colombian volunteers, the International Legion for the Defense of Ukraine, also known as the Foreign Legion.

A nation of 50 million, Colombia has long exported experienced fighters. A security alliance with the United States has made its soldiers some of the best trained and equipped in Latin America, and prolonged combat has given them experience matched by few traditional militaries.

For poor Colombian men, the military has long offered one of the few legal pathways to some financial security. Retired professional soldiers in Colombia receive a lifelong monthly pension of $400 to $600, as well as free health care for their families.

Still, those benefits are often not enough to make ends meet and many realize that the skills they have honed in jungles and mountains have little use in civilian life.

“All we know is how to use arms,” said Andrés, a retired Colombian soldier who served in Ukraine and asked that his surname be withheld for fear of damaging his career prospects.

Some veterans end up joining organized crime groups. One man interviewed for this article said he worked for three months for a Mexican cartel.

Those who remain working in the legal economy tend to become bodyguards, a job that pays veterans from elite units up to about $1,000 a month, a higher-than-average salary, but still rarely enough to reach their financial goals.

And the competition for jobs is growing. A peace deal between the government and Colombia’s largest rebel group in 2016 has significantly reduced the size of the country’s military.

The economic pressures push Colombian veterans abroad. Many covet lucrative security contracts in Middle Eastern oil states, though those positions are usually open only to men under 40, disqualifying most retired Colombian professional soldiers.

Some foreign assignments have led to scandal. Two dozen retired Colombian commandos are on trial in Haiti and the United States for their involvement in the assassination of a Haitian president in 2021.

The war in Ukraine gives Colombian veterans a rare opportunity to change their fortunes, while fighting for an internationally recognized government supported by the United States.

“He always had the ambition of being something more,” said Paola Ortiz, the widow of Mr. Herrera, the deceased Colombian soldier, who returned to Ukraine for a second tour this year after being deported from the United States. “He wanted to send his children to college, to buy a house, to open a business.”

Rumors of fighting opportunities in Ukraine began spreading on the chat groups of Colombia’s veterans last year as the initial rush of idealistic Western volunteers to the country started to level off.

More than a dozen Colombian veterans and their relatives described in interviews the volunteering process.

Colombian men travel on their own to Poland, often selling prized possessions, such as cars, to afford the trip.

At the Ukrainian border, they use translation apps to tell border guards that they have military experience and want to fight for Ukraine. Once inside the country, they present themselves at a military base in the western city of Ternopil.

After an interview and a perfunctory medical exam, they are put on a waiting list for one of two main destinations for Latin American fighters — the Foreign Legion or the Carpathian Sich 49th Infantry Battalion.

They open a local bank account and send debit cards to their families, allowing them to withdraw earnings from a Colombian A.T.M.

Colombian soldiers said they were paid about $3,000 a month in Ukrainian currency, roughly in line with the salaries of local soldiers.

At the front, they said they found a very different war from those they had known against insurgents.

Close combat with automatic weapons in densely covered terrain was replaced by bombardment in exposed areas. And they could not count on the air superiority they enjoyed in Colombia for airstrikes or evacuations.

“Those who want to come here, think about it first,” one Colombian volunteer said in an audio message sent to a veteran chat group in October. “Colombia is child’s play compared to here. When a missile first explodes near you, that’s when you see the devil in person.”

The man, whose identity is being withheld because he was not authorized to speak to the news media, said that of the 60 Colombians who had joined with him, only about seven remained. The rest were killed, wounded or returned home after a few weeks at the front.

After arriving in Ukraine in February, Mr. Barrios told his wife that the fighting was more dangerous than he had expected.

He decided to go to Ukraine after the bank threatened to repossess his house weeks after his wife, Ms. Cubillos, gave birth to their third child. His nurse’s salary could not cover the loan payments, Ms. Cubillos said.

“‘Come back, don’t leave me alone with these kids,’ I kept telling him,” Ms. Cubillos said in an interview in the Colombian city of Neiva. “But he just repeated, ‘No sweetheart, I have to save the house.’”

Mr. Barrios died in a missile strike after 20 days at the front, too soon to earn even one paycheck.

Under Ukrainian law, families of servicemen killed in combat are supposed to receive a payment of $411,000.

But Ms. Cubillos said she lacked the money for a lawyer or a plane ticket to travel to Ukraine to file the compensation claim in person.

She remains liable for his debts and said the bank continues threatening to repossess her home.

Her only memory of her husband’s Ukrainian service is a box with the flags of Ukraine and the Foreign Legion, which was delivered with his body.

“I wanted to throw all this away. Instead of him, I got a box with a flag that means nothing to me,” Ms. Cubillos said. “But I want the baby to know the story of his father, to show what came back of him.”

Thomas Gibbons-Neff and Nataliia Novosolova contributed reporting from Kyiv, Ukraine.