David Fernandez never planned on becoming a preacher.

Had he got his way, he would have been successful in one of the two attempts he made to illegally enter the US, the second time stuffed inside a truck with 180 people, their presence only revealed to the authorities by a baby that started to cry.

The smuggler – known locally as Coyote – whom he had paid $3,000, offered to arrange a third attempt, but he declined. He decided he was fated to stay in Honduras, and work for his community, a down-at-heel neighbourhood beset by violence from rival gangs, and where his mother, Maria, had for decades run a church, with a combination of passion and discipline.

“I wanted a better life, and I wanted to help provide a better life for those in Honduras,” Hernandez says of his decision. “The main problem is there are no jobs here.”

In just a couple of years, Hernandez has worked wonders. In the community of Rivera Hernandez, he has mediated with gang leaders, obtaining their permission to allow children and parents attend his church, Ministerio Cristiano Peniel, where youngsters receive lessons and meals.

He also challenged business owners to visit, and arranged jobs for 350 children, the surest way to ensure they are not recruited. He contacted the US embassy, which provided street lighting to transform his church into a literal beacon amid the gloom. Russian missionaries have provided food, and on one occasion his church fed 3,000 people.

Every year, thousands of people leave Honduras in search of a better life to the north. Along with El Salvador and Guatemala, the bulk of people seeking to enter the US come from this nation of 10 million, either paying people smugglers, or joining caravans of migrants which have made their way to the US-Mexico and sought asylum.

Opposing their ambitions has become a major plank in the re-election campaign of Donald Trump, who has made it more difficult for migrants to enter. The result has been a US policy criticised around the world, that has seen children split up from their parents, and tens of thousands of migrants forced to wait in dangerous Mexican border cities while claims are processed.

All the while, the migrants keep trying; images of their bodies washed up in the Rio Grande, or else in some remote desert, revealing in stark colours what happens when things do not work out.

Migrants try to enter the US for various reasons – for better opportunities, because climate change is driving them from the land, or to escape poverty. For those fleeing the Central America northern triangle, escaping gang violence that has become endemic over the past 25 years, is another major driver.

Migrants who joined those caravans told The Independent gangs such as MS-13 and Calle 18, could beat or kill people, simply for crossing into an area controlled by another group. This made it impossible to go to work, or school or church. They said they extorted and kidnapped people, and peddled drugs. People in the poorest neighbourhoods were the most affected, they said, because police had little incentive to act.

The greatest fear was that one of the children would be recruited. Gangs start looking for new members as young as eight, winning their loyalty with small gifts, food, and friendship. Things escalate rapidly, and youngsters start acting as lookouts, or “flags”, handed a mobile phone and told to call if they spot something unusual.

Meeting the people that choose to stay and study in Honduras

Today, Honduras has the highest per-capita murder rate in the world, second only to El Salvador. In 2019, there have been 56 killings per 100,000 people, and 81 in El Salvador. By contrast, the US has reported 5, and Britain just 1.2. As remarkable as they are, those figures are down from the beginning of the decade, after president Juan Orlando Hernandez launched a controversial anti-gang initiative targeting violent neighbourhoods.

Last month, a court in New York convicted Hernandez’s brother, Tony, of drug trafficking in a major conspiracy case in which prosecutors said he received the backing of the state. Juan Orlando, an ally of the US, has denied any involvement.

A report published by the Norwegian Refugee Council (NRC), which works with communities, found up to 50 per cent of children living in gang-affected areas in Honduras, were unable to go to school. In El Salvador, the figure was 40 per cent. The US agency for international development has estimated there are 36,000 gang members in the country.

“From our point of view, this is the number one reason people leave,” says Christian Visnes, the NRC’s regional director. He says there are other factors, often overlapping, and that it is difficult to provide statistics to substantiate his point, but he adds: “Violence is the issue that most forces people out.”

Trump has boasted of his efforts to deport from the US member of gangs such as MS-13, which were founded more than a generation ago among Latino immigrants in California jails, and then “returned” to Central America when such people were returned to their countries of origin having completed their sentences. In his state of the union speech, he claimed “the savage gang, MS-13, now operates in 20 different American states, and they almost all come through our southern border”.

At the same time, he has mocked migrants for expressing fears about violence. At a rally in Michigan this March, he said asylum seekers were told by lawyers talk up their anxiety. “It’s a big, fat con job, folks.”

David Fernandez, pictured here with his teenage son and namesake, feeds local children at his church (Andrew Buncombe)

For some in Honduras, the killings make for good business.

At the mortuary in the city of San Pedro Sula, its wall built of grey stone and surrounded by black metal bars that look like crosses, families come to find information about relatives who have been killed or gone missing. Here, undertaker and coffin salesman Herman Cruz works split 24-hour shifts.

Cruz, who has been doing the job for five years, says almost everybody brought to the mortuary was killed in an act of violence. Natural deaths, he says, are dealt with by hospitals, but killings require an investigation by a prosecutor.

Cruz is affable and talkative. On average, he says, he deals with three bodies a day. There was one time in March, when he responded to 17 murders in a single day. Cruz has witnessed much horror, and seeks to comfort families of victims. Bodies are washed with formaldehyde, bullet holes covered by clothes for burial. One victim he attended to, bore 50 bullet holes. The cheapest coffin, along with the dressing of a body, costs the equivalent of $250 (£195).

Frequently the gangs use machetes to carry our their killings, and Cortez has to reassemble arms, legs and heads, sewing the pieces back together and making them as unviolated as possible.

“We advise the mothers and father not to come and see the body,” he says, suggesting that it is less traumatic for another family member, such as an uncle, to identify the remains.

As we talk, a young woman arrives. Rosa Redondo, is seeking information about her nephew, Oscar Valenzuela, who was killed in Morazan, a two-hour car drive to the east. “Nobody is willing to talk to the police, and the police have not caught anyone,” she says. She says her nephew was killed by someone using a machete.

Cruz says he is not the only undertaker plying his trade here. Indeed, he claims he has up to a dozen rivals, which is why he works 24 hours straight, before taking a day off. He says: “It’s a good business, here in San Pedro Sula.”

Smiley says he has been a member of MS-13 for five years, and over that time killed four people. He sits in the back of our, dressed in a Los Angeles Dodgers baseball shirt and covering his head with a to be photographed, and cradling a long-barrelled revolver. He says he is 19, but looks no older than 14.

We arrange to meet in Rivera Hernandez, phoning ahead and waiting for a call back to be informed he had received permission to speak.

Smiley, who keeps glancing nervously over his shoulder, says the gang makes money selling drugs, and that his boss is a man known as “the scorpion”. It is rumoured one of the young woman who had been waiting with Smiley is sometimes deployed as a “honey trap” to catch and kill rival gang members, but he says she is just a look out.

“A gang member told me the gangs can give you love,” he says of his recruitment, aged 15. “And it’s true, the gangs give you better love than you can find.” He says he is married and has a child, that his other family members are unable to contact him because he has a relatively senior position in the gang.

Asked how he feels about groups such as MS-13 being responsible for the massive level of violence in Honduras, sufficient to drive away hundred of thousands of migrants, he claims is it Calle 18, and not MS-13, that creates problems for ordinary people. He says people do not know enough about gangs, so they get confused.

Experts say once someone joins a gang, it is virtually impossible to leave. The only recognised exit is to become a priest in the Catholic Church and renounce alcohol, drugs and sex. Becoming an evangelical priest, whose lives are considered less, restrained, is not considered sufficient.

Asked if he has a plan for the months and years ahead, he says: “I don’t think about the future. I only think about this moment.”

There are diagrams that show which gangs control San Pedro Sula’s different neighbourhoods. David Fernandez, the pastor, has no need for such a map; as he drives through the streets near his church, he points out which area is controlled by MS-13, which by Calle 18, and those claimed by groups less well known internationally, such as the Vatos Locos.

Most dangerous are the frontiers between two groups, or an area that is contested. “That street there is the frontline,” he says, pointing.

Fernandez says he has negotiated with gangs not only to permit children to come to his church, but to allow him and his family pass in safety. He sometimes gang members attend his services, and he has also been asked to conduct “cleansing” prayers in houses where an execution was carried out.

It is Sunday evening, and the church is busy with life. Young people dressed in blue and white costumes performance an energetic dance routine. There is music, and singing, and prayers for the safety of those in attendance.

Fernandez, who has three children and whose eldest son is also called David, once worked as a police officer. He has developed a commonsense approach to his work as a pastor. He teaches Bible classes, but also pushes children to look for work and opportunities beyond their neighbourhood.

“When Jesus saw sick people he prayed for them, but he also gave them food. That is practical. You have to help people,” he says. “You pray for people, but you have to feed them too.”

Additional reporting by Paulo Cerrato in San Pedro Sula

Read the first part of the Beyond the Border series here: Honduras: Inside ground zero of the Central American migrant crisis

Read the second part of the Beyond the Border series here: Honduras: Where climate change and mass migration have created a village of women