The killer was only 14 and had lived in youth homes as a ward of the authorities since he was eight.
A year ago, a gang helped the boy escape, put him up in a hotel, and gave him cannabis, food, and new clothes. Six days later, gang members told him it was time to repay them for their kindness. They had a job for him.
Together with another youth, the boy, who as a juvenile cannot be identified, shot dead a 33-year-old Hells Angels biker. He was convicted by a court that described the case as a gangland contract killing.
As he was too young to be sentenced, he was handed back to social services and sent to another youth home.
Sweden has long prided itself on one of the world's most generous social safety nets, with a state that looks after vulnerable people at all stages of life.
But these days it also has another distinction: by far the highest per capita rate of gun violence in the EU. Last year 55 people were shot dead in 363 separate shootings in a country of just 10 million people. By comparison, there were just six fatal shootings in the three other Nordic countries - Norway, Finland, and Denmark - combined.
In an increasing number of cases, courts have found the epidemic of violence emerging from Sweden's archipelago of youth homes, built to serve the dual purpose of looking after children in state care and punishing youth offenders.
According to accounts for this story from eight sources including a former gang member, several youth home workers, prosecutors and criminologists, the homes have turned into recruiting grounds for gangs, who use them to enlist killers too young to be jailed.
TROUBLED TEEN TO 'CAREER CRIMINAL'
Yayha, now 23, was first sent to a youth home at 16, finding himself bunking with seven other boys in a dormitory wing in Gothenburg, the gritty port city on Sweden's west coast that houses the biggest harbour in Scandinavia.
His father had died a couple of years earlier. He had dropped out of school and was convicted of assault and theft, beating up other kids, and stealing their phones and clothes.
During his year in the home, members of one of Gothenburg's criminal gangs became his new family, he told Reuters in a coffee shop by the harbour in the city where he now works as a carpenter after escaping the gang life.
"I was a troubled teen when I entered and came out a career criminal. I went from fighting and stealing from other kids to selling drugs by the kilo," said Yayha, who asked that his surname not be used to prevent his former gang from finding him.
"You wanted the respect, the clothes, the rings, the money but also friendship. They were the people you hung out with anyway. Later it became more serious and you had to do things that you really didn't want to, but that is the way it works."
The wave of violence has come to overshadow all else in Swedish politics, driving the rise of a rightwing coalition with the support of the far right, which came to power in 2022, ending the latest eight-year period of rule by the Social Democrats, Sweden's dominant political party since the 1930s.
The new government has promised to tackle crime. So far it has further restricted Sweden's previously generous immigration policies, introduced harsher sentences for gun crimes, and given police increased surveillance powers. Even the military has been called on to help out.
"It is obvious that our system wasn't built for this type of criminality," Justice Minister Gunnar Strommer told Reuters.
He said the government was working on a revamp of the entire youth criminality prevention system, including giving more powers to social services. New youth prisons would house the most hardened criminals, keeping them separate from youth homes.
"I think it is clear that in reality, the state-run homes have functioned as a kind of recruitment base from the criminal networks," Strommer said. "It's a monumental failure."
'LINKEDIN FOR YOUNG CRIMINALS'
Sweden's youth homes have varying degrees of security, with around 700 of the most troubled youths housed in 21 homes run by a state body, the National Board of Institutional Care (SiS).
Children with social problems can find themselves sleeping in beds next to those who have committed serious crimes. Most children stay for less than a year but some can be held for up to four years.
The homes are often fenced off, with schools and parks on the premises. While the youths are not allowed to leave without permission, security is often lax.
Residents have access to phones and tablets making it possible for gang members to contact them from outside. In one case now being tried, prosecutors have charged a boy of 15 with planning and ordering three murders in Stockholm from inside a youth home.
Birgitta Dahlberg, head of youth care at the SiS, told Reuters it was unfair to blame the homes for their inability to deal with serious violent offenders, which they were not designed to handle.
"When it comes to serious criminality, it is fair to say that the legislation has not given us the right conditions," she said, noting that until regulations were changed just weeks ago staff did not even have sufficient authority to take away residents' mobile phones.
Children as young as 12 are often gang members already by the time they arrive, said Alexander, who works at the Gothenburg home where Yahya stayed. He declined to give his surname as he was not authorised to speak publicly.
"Out of our 40 boys, around half are gang affiliated when they come here," he told Reuters.
"If you put two new kids in a wing where six out of eight inmates are with the Foxtrot gang, it doesn't take a genius to figure out what could happen," he said, referring to one of the largest gangs believed to have hundreds of members.
Two other youth home workers, speaking on condition of anonymity, gave similar accounts of rampant gang membership among their charges.
In theory, the youth homes aim to rehabilitate young offenders to prevent them from becoming adult criminals. But according to a report released weeks ago by the Swedish National Audit Office which supervises the government, nine out of ten gang-affiliated youngsters at youth homes go on to relapse into crime, and almost eight out of ten eventually end up in prison.
The youth homes seem to do more harm than good, said Stockholm prosecutor Lisa dos Santos, who has handled numerous cases of youth gang crimes.
"One police officer described them as LinkedIn for young criminals," she said. "You wonder what effect they have had in spreading gang crime when boys from different parts of the country are put together."
While Swedish law allows criminal prosecution of people as young as 15, those under 18 are very rarely sent to prison even for serious crimes. Dos Santos said gangs are exploiting this, deliberately recruiting children to commit acts that would lead to a long jail sentence for an adult.
Sweden has about 14,000 active gang criminals and an additional 48,000 people loosely affiliated with gangs, according to a police report last year.
Other European countries such as the Netherlands, France, and Belgium are also struggling with violent gangs, but Sweden has outpaced them all in gun violence, by wide margins.
In 2022, there were 73 youths in Sweden aged 15-20 suspected of murder or attempted murder with firearms, up from just 10 a decade earlier, according to the Crime Prevention Board, a government agency.
According to EU statistics agency Eurostat, 25 people aged 15-24 were killed by gun violence in Sweden in 2021, second in the EU only to France, which had 40 such deaths across a population six times the size of Sweden's.
Nils Duquet, director of the Flemish Peace Institute, a leading European gun violence think tank, said the reliance of Sweden's gangs on young recruits to commit violent crimes had created a different culture around guns than elsewhere in Europe.
Elsewhere, criminal gangs tend to reserve access to guns for older and more senior members, he said. In Sweden, the youngest are expected to pull the trigger.
"Because there are so many young criminals with access to guns, that makes it so violent," Duquet said.
(Except for the headline, this story has not been edited by NDTV staff and is published from a syndicated feed.)
Track Latest News Live on NDTV.com and get news updates from India and around the world