On the day Amílcar Henríquez was killed he had been playing dominoes in Nuevo Colón, Panama. The assassins waited, using the house opposite his as a base where they planned to gun him down. Witnesses heard 23 shots and police found the stolen red Nissan Versa they drove, an AK47 assault rifle, a 9mm revolver and more than a hundred rounds of ammunition. Henríquez, hit a dozen times, was rushed to hospital, where he died. A second man, Delano Wilson, was also killed. Josimar Gómez was wounded. It was 15 April 2017.

Henríquez was 33, a father of three small children, and his only fear, he had said, was leaving them. He was also a professional footballer for Árabe Unido and the national team, which he represented 85 times. His penalty gave Panama the only title in their history – the 2009 Copa Naciones – and in his last interview, three weeks earlier, he expressed his hopes of reaching a first World Cup, having narrowly missed out four years before. Now they had one last chance.

Panama World Cup 2018 team guide: tactics, key players and expert predictions Read more

“We’re fighting for a dream that escaped us, a golden end for this generation after years of suffering and battling,” Henríquez told the fifa.com website. “That hurt marked us all and still saddens; it was taken from us in the blink of an eye.”

Henríque’s funeral was held at the Estadio Armando Dely Valdés, his No 21 shirt draped on the coffin. Gary Stempel, Panama coach in 2009, calls it “devastating”. Gabriel Gómez, who has more caps than anyone, vowed: “We have to reach the World Cup for him.” Six months on, a late goal took them there, where they will face England.

Facebook Twitter Pinterest Henríquez before a match against Mexico in Panama City in 2013. Photograph: Arnulfo Franco/AP

“What happened hit hard,” says Édgar Carvajal, Panama’s assistant coach. “We have two homes: our own and our team. You look back and see him in the middle: a leader, a role model. We always talked about him, how we had to win in Amílcar’s name.”

Hernán Darío “Bolillo” Gómez is the coach who, as Colombia’s assistant, lived through the assassination of Andrés Escobar in 1994 and led Panama to this World Cup. “I took Amílcar to Independiente Medellín. I’ve known him a long time and he was the one saying: ‘Profe, come to Panama, help us.’ The affection was mutual. He was a good man, a leader …” Gómez’s voice trails off. “… and they killed him.” What happened? “Nah, I don’t even want to be involved. I don’t ask. He died. And the pain is there.”

Panama’s president, Juan Carlos Varela, vowed to catch the killers and four days later the security minister Alexis Bethancourt suggested the most probable explanation was “rencillas” – a feud.

Years before, Amílcar told the story of armed robbers putting a gun to his head and pulling the trigger only for it to jam. This, though, was not the same nor so easily explained. And if it was a feud, what kind? Shot a dozen times, this was targeted, no accident. Arrests were swift – seven were detained, six teenagers – but the case remains open and police will not discuss it. Colón, on the Caribbean coast, is a city marked by drug trafficking, gangs and violence, and Henríquez had played in Medellín. A middle‑aged man wanted in connection with his killing was recently found shot dead. “There are many questions and a lot of pain,” said Pedro Chaluja, president of the Panamanian football federation.

Play Video 8:40 Panama's World Cup journey: the former Millwall coach behind their success – video

Yet, while Henríquez’s is the most significant case, it is not an isolated one. It fits a broader, alarming pattern. Since the shooting of Miguel Tello in 1990, 19 footballers have been killed. Others have ended up in jail. Like Henríquez, José Luis Garcés was shot at; perhaps this generation’s most talented player, he has also been imprisoned.

José Calderón, Panama’s goalkeeper, saw a friend shot. José Fajardo, on the shortlist for the World Cup, recently revealed his gang past. And one former gang member says: “I’ve seen many players involved in drug trafficking, crime, gangs, money laundering for the cartels, funding arms … and the outcome is death or jail.”

Footballers come from difficult environments. 70% of them are at ‘social risk’ Juan Ramón Solís

“This is not about football and it’s not just about Amílcar; it’s about society,” Chaluja insisted. The numbers, though, suggest something specific to football and society makes up the players’ reality. “Amílcar is another in that statistic,” says Juan Ramón Solís, president of the recently formed players’ union. “Footballers live in and come from difficult environments. 70% of them are at ‘social risk’. Broken families, lack of education or a truly professionalised football offering real opportunities, infrastructure and youth development.”

In that environment crime is incubated, the dangers present. Garcés played with Luis Suárez and Diego Godín at Nacional in Uruguay: there is sadness as well as joy as he contemplates a World Cup he could have been at with his “brothers”. “I got hit by a bullet. They sent them to kill me; they’d been following me all over Panama,” he says slowly, long pauses punctuating his speech. He insists he has never been in a gang, that the shooting was a “family” matter, but adds: “Panama is a complicated country, with gangs, drugs, robberies. Most footballers know that [world]; many take the wrong path and end up in jail. I wouldn’t wish that on anyone.”

Panama has the lowest homicide rate in Central America – 424 killings in 2017 – and, while it is poor, neither the poverty nor the violence there matches its neighbours’. It does not have an exceptional drugs consumption problem but it is a major point of transit for cocaine out of Colombia towards the US. One police officer admitted 80 tonnes of cocaine were seized last year – “and that’s just what was intercepted”. Cartels have begun paying traffickers in drugs, not dollars, driving a local market, and army decommissioning brought a flood of firearms. There are more than 200 gangs, coalescing in two dominant groups, Bagdad and Calor Calor.

In the neighbourhood of El Chorrillo – home of Plaza Amador and birthplace of Rommel Fernández, after whom the national stadium is named – rumba blares, football is played on the streets and gang members stand on corners. Álvaro Robles, a professional for more than a decade, is from here. “Football is a powerful tool,” he says. But, he admits, not powerful enough. “Football has to get to them before ‘others’ do,” he says – and even if it does, there are no guarantees.

Facebook Twitter Pinterest A match between professionals and inmates at La Joyita prison. Photograph: Sistema Penitenciario/Ministerio de Gobierno

A friend of Henríquez – a former inmate at Tinjitas who worked for a cartel and was imprisoned for homicide – says: “Footballers are overwhelmingly from the lowest strata of society. In neighbourhoods where it’s 80% crime, they’re vulnerable; the cartels manipulate you.” Outside the church where Robles preaches, Alfredo, a 20‑year‑old fan, says: “There are very poor neighbourhoods, kids with talent but no support. The dangers are there: little work, little money, drugs. Hopefully,” he adds, “the World Cup can help.”

“It has united the country,” says Bolillo, and the impact is felt beyond the pitch. Before training, veteran internationals Gabriel Gómez, Blas Pérez and Felipe Baloy address kids invited to the session. “They didn’t talk about football, they talked about life, values,” Bolillo notes later. “That’s fundamental; in our countries we still lack education.”

Gómez recalls the “difficult neighbourhoods” from which “almost all of us came”, times when there “wasn’t enough to eat”. Baloy says: “Football changed my life, my family’s life; I learnt things I didn’t learn in my neighbourhood. I’m another person now, thankfully.”

Football was a way out for them; for others it was not. They departed – only two of the squad play in Panama – and for those who stay, the game is not always an escape. Club attendances typically number in the hundreds and even the well paid do not earn much over $1,000 a month.

Until recently salaries often went unpaid. Rodrigo Tello, a former under-20 international, is in Joyita jail, Panama’s toughest. “Look at my case,” he says. “Robbery! Need! Football hasn’t given me anything. There was nothing to eat, clubs abuse your ability, the system doesn’t help. I thought: ‘I have so much talent and I can’t even help my mum.’ You get ideas, choose a different path. I chose badly.”

It runs deeper. The World Cup offers hope, awareness, but there is a long way to go. “Usually, a solid structure supports a strong national team; ours is the other way around,” says Solís. “There’s a lack of facilities, resources, work on the human, social dimension: we need to stop these statistics rising.”

One first division coach notes that there is “virtually no coaching, no organisation before 17, 18”, and the difference with baseball may be instructive: it has a formative role, embracing education, parental involvement and personal development, and faces virtually none of the problems football has. You can leave the barrio but the barrio does not leave you; the relationships remain, the ties bind you, surround you. Some suggest that security forces may have warned Henríquez to leave.

Facebook Twitter Pinterest The national team coach Hernán Darío ‘Bolillo’ Gómez talks to kids at pre-World Cup training in Panama City. Photograph: Ramon Lepage/The Guardian

Solís says: “Many have friends and families in gangs, a past linked to that. Amílcar was an established player, an international who’d played abroad, and so it can be hard to explain. We don’t know his case, but for many players that life, that environment, is hard to leave behind – and that’s where the ‘enemy’ appears, to take their life.”

Robles clings to the power football has for good, hope of redemption. Acquitted after being wrongly imprisoned for drugs trafficking, and remarkably lacking in bitterness, he takes footballers into prisons to play against inmates. The goalkeeper Óscar Macfarlane is absent – his team, Tauro, are preparing for the national final – but the side is strong. The first stop is Tinijitas, high above Panama City, where Robles spent five years. At the entrance armed guards sit in a small, sweaty hut; there are concrete workshops with tin roofs, crumbling buildings. Skinny stray dogs lie in the sun. In the middle is a concrete court with small goals, enclosed by endless rolls of razor wire, torn clothing hanging from it. Birds of prey circle. A guard with a machine gun occupies a watchtower.

Luis Tejada: the journeyman striker hoping to fulfil a message from God Read more

The prisoners’ team comes out; others watch from behind bars. Bobby Brown, who played in Austria, Uruguay and the US, takes a couple aside for a gentle, paternal word: footballers awaiting trial, accused of kidnapping. “They’re not always as they’re portrayed, some are victims of the system: we come, embrace them, play,” Robles says. Then it starts: the game is fast, competitive and the inmates win. At the end they gather: there’s applause, prayer, thanks, and Robles addresses them. “Whatever mistakes you made, we believe in you. The ball can help. You’re not worms, you’re people.”

Players, too. At La Joyita, a big, crowded prison an hour east, through caged walkways and checkpoints, new inmates sitting in holding pens clutching small plastic bags and tiny foam mattresses, a Fifa banner hangs optimistically by a dusty red dirt pitch. Support for the national team is painted over a doorway: “Vamos Panama!” An “advertising board” says “God is faithful”, but the place is unforgiving.

World Cup Fiver: sign up and get our daily football email

By the pitch Rodrigo Tello and his team prepare. A small, skilful attacker, like Garcés, he could have been at this World Cup but his career ended the day he arrived here a decade ago; now he wants to help others build theirs. “I cried when I ‘fell’. I was a No 10. I could do it all. I’m 34 now, it’s not the same,” he says. “I made a mistake, I want to give something back. There’s talent here, five or six who can definitely make it. Some have six years left, others longer. The prison director told me he’d let clubs come to see them play.”

“We’re the team for Qatar,” one says, grinning. 32km west, the team for Russia prepare for their first World Cup – the “dream” Henríquez had. “You think about it and it’s hard, sad,” Carvajal says the following morning at dawn, sitting in the stands minutes before the session starts. “Wherever he is, he’ll be watching us, sending us the energy he always did.”