When the drugs came, they hit all at once. It was the 80s, and by the time one in 10 people had slipped into the depths of heroin use – bankers, university students, carpenters, socialites, miners – Portugal was in a state of panic.

Álvaro Pereira was working as a family doctor in Olhão in southern Portugal. “People were injecting themselves in the street, in public squares, in gardens,” he told me. “At that time, not a day passed when there wasn’t a robbery at a local business, or a mugging.”

The crisis began in the south. The 80s were a prosperous time in Olhão, a fishing town 31 miles west of the Spanish border. Coastal waters filled fishermen’s nets from the Gulf of Cádiz to Morocco, tourism was growing, and currency flowed throughout the southern Algarve region. But by the end of the decade, heroin began washing up on Olhão’s shores. Overnight, Pereira’s beloved slice of the Algarve coast became one of the drug capitals of Europe: one in every 100 Portuguese was battling a problematic heroin addiction at that time, but the number was even higher in the south. Headlines in the local press raised the alarm about overdose deaths and rising crime. The rate of HIV infection in Portugal became the highest in the European Union. Pereira recalled desperate patients and families beating a path to his door, terrified, bewildered, begging for help. “I got involved,” he said, “only because I was ignorant.”

In truth, there was a lot of ignorance back then. Forty years of authoritarian rule under the regime established by António Salazar in 1933 had suppressed education, weakened institutions and lowered the school-leaving age, in a strategy intended to keep the population docile. The country was closed to the outside world; people missed out on the experimentation and mind-expanding culture of the 1960s. When the regime ended abruptly in a military coup in 1974, Portugal was suddenly opened to new markets and influences. Under the old regime, Coca-Cola was banned and owning a cigarette lighter required a licence. When marijuana and then heroin began flooding in, the country was utterly unprepared.

Pereira tackled the growing wave of addiction the only way he knew how: one patient at a time. A student in her 20s who still lived with her parents might have her family involved in her recovery; a middle-aged man, estranged from his wife and living on the street, faced different risks and needed a different kind of support. Pereira improvised, calling on institutions and individuals in the community to lend a hand.

In 2001, nearly two decades into Pereira’s accidental specialisation in addiction, Portugal became the first country to decriminalise the possession and consumption of all illicit substances. Rather than being arrested, those caught with a personal supply might be given a warning, a small fine, or told to appear before a local commission – a doctor, a lawyer and a social worker – about treatment, harm reduction, and the support services that were available to them.

The opioid crisis soon stabilised, and the ensuing years saw dramatic drops in problematic drug use, HIV and hepatitis infection rates, overdose deaths, drug-related crime and incarceration rates. HIV infection plummeted from an all-time high in 2000 of 104.2 new cases per million to 4.2 cases per million in 2015. The data behind these changes has been studied and cited as evidence by harm-reduction movements around the globe. It’s misleading, however, to credit these positive results entirely to a change in law.

Portugal’s remarkable recovery, and the fact that it has held steady through several changes in government – including conservative leaders who would have preferred to return to the US-style war on drugs – could not have happened without an enormous cultural shift, and a change in how the country viewed drugs, addiction – and itself. In many ways, the law was merely a reflection of transformations that were already happening in clinics, in pharmacies and around kitchen tables across the country. The official policy of decriminalisation made it far easier for a broad range of services (health, psychiatry, employment, housing etc) that had been struggling to pool their resources and expertise, to work together more effectively to serve their communities.

The language began to shift, too. Those who had been referred to sneeringly as drogados (junkies) – became known more broadly, more sympathetically, and more accurately, as “people who use drugs” or “people with addiction disorders”. This, too, was crucial.

It is important to note that Portugal stabilised its opioid crisis, but it didn’t make it disappear. While drug-related death, incarceration and infection rates plummeted, the country still had to deal with the health complications of long-term problematic drug use. Diseases including hepatitis C, cirrhosis and liver cancer are a burden on a health system that is still struggling to recover from recession and cutbacks. In this way, Portugal’s story serves as a warning of challenges yet to come.

Despite enthusiastic international reactions to Portugal’s success, local harm-reduction advocates have been frustrated by what they see as stagnation and inaction since decriminalisation came into effect. They criticise the state for dragging its feet on establishing supervised injection sites and drug consumption facilities; for failing to make the anti-overdose medication naloxone more readily available; for not implementing needle-exchange programmes in prisons. Where, they ask, is the courageous spirit and bold leadership that pushed the country to decriminalise drugs in the first place?

In the early days of Portugal’s panic, when Pereira’s beloved Olhão began falling apart in front of him, the state’s first instinct was to attack. Drugs were denounced as evil, drug users were demonised, and proximity to either was criminally and spiritually punishable. The Portuguese government launched a series of national anti-drug campaigns that were less “Just Say No” and more “Drugs Are Satan”.

Informal treatment approaches and experiments were rushed into use throughout the country, as doctors, psychiatrists, and pharmacists worked independently to deal with the flood of drug-dependency disorders at their doors, sometimes risking ostracism or arrest to do what they believed was best for their patients.

In 1977, in the north of the country, psychiatrist Eduíno Lopes pioneered a methadone programme at the Centro da Boavista in Porto. Lopes was the first doctor in continental Europe to experiment with substitution therapy, flying in methadone powder from Boston, under the auspices of the Ministry of Justice, rather than the Ministry of Health. His efforts met with a vicious public backlash and the disapproval of his peers, who considered methadone therapy nothing more than state-sponsored drug addiction.

In Lisbon, Odette Ferreira, an experienced pharmacist and pioneering HIV researcher, started an unofficial needle-exchange programme to address the growing Aids crisis. She received death threats from drug dealers, and legal threats from politicians. Ferreira – who is now in her 90s, and still has enough swagger to carry off long fake eyelashes and red leather at a midday meeting – started giving away clean syringes in the middle of Europe’s biggest open-air drug market, in the Casal Ventoso neighbourhood of Lisbon. She collected donations of clothing, soap, razors, condoms, fruit and sandwiches, and distributed them to users. When dealers reacted with hostility, she snapped back: “Don’t mess with me. You do your job, and I’ll do mine.” She then bullied the Portuguese Association of Pharmacies into running the country’s – and indeed the world’s – first national needle-exchange programme.

A flurry of expensive private clinics and free, faith-based facilities emerged, promising detoxes and miracle cures, but the first public drug-treatment centre run by the Ministry of Health – the Centro das Taipas in Lisbon – did not begin operating until 1987. Strapped for resources in Olhão, Pereira sent a few patients for treatment, although he did not agree with the abstinence-based approach used at Taipas. “First you take away the drug, and then, with psychotherapy, you plug up the crack,” said Pereira. There was no scientific evidence to show that this would work – and it didn’t.

He also sent patients to Lopes’s methadone programme in Porto, and found that some responded well. But Porto was at the other end of the country. He wanted to try methadone for his patients, but the Ministry of Health hadn’t yet approved it for use. To get around that, Pereira sometimes asked a nurse to sneak methadone to him in the boot of his car.

Pereira’s work treating patients for addiction eventually caught the attention of the Ministry of Health. “They heard there was a crazy man in the Algarve who was working on his own,” he said, with a slow smile. Now 68, he is sprightly and charming, with an athletic build, thick and wavy white hair that bounces when he walks, a gravelly drawl and a bottomless reserve of warmth. “They came down to find me at the clinic and proposed that I open a treatment centre,” he said. He invited a colleague from at a family practice in the next town over to join him – a young local doctor named João Goulão.

Goulão was a 20-year-old medical student when he was offered his first hit of heroin. He declined because he didn’t know what it was. By the time he finished school, got his licence and began practising medicine at a health centre in the southern city of Faro, it was everywhere. Like Pereira, he accidentally ended up specialising in treating drug addiction.

Facebook Twitter Pinterest A nurse hands out methadone to addicts in Lisbon. Photograph: Horacio Villalobos/Corbis via Getty Images

The two young colleagues joined forces to open southern Portugal’s first CAT in 1988. (These kinds of centres have used different names and acronyms over the years, but are still commonly referred to as Centros de Atendimento a Toxicodependentes, or CATs.) Local residents were vehemently opposed, and the doctors were improvising treatments as they went along. The following month, Pereira and Goulão opened a second CAT in Olhão, and other family doctors opened more in the north and central regions, forming a loose network. It had become clear to a growing number of practitioners that the most effective response to addiction had to be personal, and rooted in communities. Treatment was still small-scale, local and largely ad hoc.

The first official call to change Portugal’s drug laws came from Rui Pereira, a former constitutional court judge who undertook an overhaul of the penal code in 1996. He found the practice of jailing people for taking drugs to be counterproductive and unethical. “My thought right off the bat was that it wasn’t legitimate for the state to punish users,” he told me in his office at the University of Lisbon’s school of law. At that time, about half of the people in prison were there for drug-related reasons, and the epidemic, he said, was thought to be “an irresolvable problem”. He recommended that drug use be discouraged without imposing penalties, or further alienating users. His proposals weren’t immediately adopted, but they did not go unnoticed.

In 1997, after 10 years of running the CAT in Faro, Goulão was invited to help design and lead a national drug strategy. He assembled a team of experts to study potential solutions to Portugal’s drug problem. The resulting recommendations, including the full decriminalisation of drug use, were presented in 1999, approved by the council of ministers in 2000, and a new national plan of action came into effect in 2001.

Today, Goulão is Portugal’s drug czar. He has been the lodestar throughout eight alternating conservative and progressive administrations; through heated standoffs with lawmakers and lobbyists; through shifts in scientific understanding of addiction and in cultural tolerance for drug use; through austerity cuts, and through a global policy climate that only very recently became slightly less hostile. Goulão is also decriminalisation’s busiest global ambassador. He travels almost non-stop, invited again and again to present the successes of Portugal’s harm-reduction experiment to authorities around the world, from Norway to Brazil, which are dealing with desperate situations in their own countries.

“These social movements take time,” Goulão told me. “The fact that this happened across the board in a conservative society such as ours had some impact.” If the heroin epidemic had affected only Portugal’s lower classes or racialised minorities, and not the middle or upper classes, he doubts the conversation around drugs, addiction and harm reduction would have taken shape in the same way. “There was a point whenyou could not find a single Portuguese family that wasn’t affected. Every family had their addict, or addicts. This was universal in a way that the society felt: ‘We have to do something.’”

Portugal’s policy rests on three pillars: one, that there’s no such thing as a soft or hard drug, only healthy and unhealthy relationships with drugs; two, that an individual’s unhealthy relationship with drugs often conceals frayed relationships with loved ones, with the world around them, and with themselves; and three, that the eradication of all drugs is an impossible goal.

“The national policy is to treat each individual differently,” Goulão told me. “The secret is for us to be present.”

A drop-in centre called IN-Mouraria sits unobtrusively in a lively, rapidly gentrifying neighbourhood of Lisbon, a longtime enclave of marginalised communities. From 2pm to 4pm, the centre provides services to undocumented migrants and refugees; from 5pm to 8pm, they open their doors to drug users. A staff of psychologists, doctors and peer support workers (themselves former drug users) offer clean needles, pre-cut squares of foil, crack kits, sandwiches, coffee, clean clothing, toiletries, rapid HIV testing, and consultations – all free and anonymous.

On the day I visited, young people stood around waiting for HIV test results while others played cards, complained about police harassment, tried on outfits, traded advice on living situations, watched movies and gave pep talks to one another. They varied in age, religion, ethnicity and gender identity, and came from all over the country and all over the world. When a slender, older man emerged from the bathroom, unrecognisable after having shaved his beard off, an energetic young man who had been flipping through magazines threw up his arms and cheered. He then turned to a quiet man sitting on my other side, his beard lush and dark hair curling from under his cap, and said: “What about you? Why don’t you go shave off that beard? You can’t give up on yourself, man. That’s when it’s all over.” The bearded man cracked a smile.

During my visits over the course of a month, I got to know some of the peer support workers, including João, a compact man with blue eyes who was rigorous in going over the details and nuances of what I was learning. João wanted to be sure I understood their role at the drop-in centre was not to force anyone to stop using, but to help minimise the risks users were exposed to.

“Our objective is not to steer people to treatment – they have to want it,” he told me. But even when they do want to stop using, he continued, having support workers accompany them to appointments and treatment facilities can feel like a burden on the user – and if the treatment doesn’t go well, there is the risk that that person will feel too ashamed to return to the drop-in centre. “Then we lose them, and that’s not what we want to do,” João said. “I want them to come back when they relapse.” Failure was part of the treatment process, he told me. And he would know.

João is a marijuana-legalisation activist, open about being HIV-positive, and after being absent for part of his son’s youth, he is delighting in his new role as a grandfather. He had stopped doing speedballs (mixtures of cocaine and opiates) after several painful, failed treatment attempts, each more destructive than the last. He long used cannabis as a form of therapy – methadone did not work for him, nor did any of the inpatient treatment programmes he tried – but the cruel hypocrisy of decriminalisation meant that although smoking weed was not a criminal offence, purchasing it was. His last and worst relapse came when he went to buy marijuana from his usual dealer and was told: “I don’t have that right now, but I do have some good cocaine.” João said no thanks and drove away, but soon found himself heading to a cash machine, and then back to the dealer. After this relapse, he embarked on a new relationship, and started his own business. At one point he had more than 30 employees. Then the financial crisis hit. “Clients weren’t paying, and creditors started knocking on my door,” he told me. “Within six months I had burned through everything I had built up over four or five years.”

Facebook Twitter Pinterest Addicts waiting for methadone at a drug treatment project in Lisbon. Photograph: Horacio Villalobos/Corbis via Getty Images

In the mornings, I followed the centre’s street teams out to the fringes of Lisbon. I met Raquel and Sareia – their slim forms swimming in the large hi-vis vests they wear on their shifts – who worked with Crescer na Maior, a harm-reduction NGO. Six times a week, they loaded up a large white van with drinking water, wet wipes, gloves, boxes of tinfoil and piles of state-issued drug kits: green plastic pouches with single-use servings of filtered water, citric acid, a small metal tray for cooking, gauze, filter and a clean syringe. Portugal does not yet have any supervised injection sites (although there is legislation to allow them, several attempts to open one have come to nothing), so, Raquel and Sareia told me, they go out to the open-air sites where they know people go to buy and use. Both are trained psychologists, but out in the streets they are known simply as the “needle girls”.

“Good afternoon!” Raquel called out cheerily, as we walked across a seemingly abandoned lot in an area called Cruz Vermelha. “Street team!” People materialised from their hiding places like some strange version of whack-a-mole, poking their heads out from the holes in the wall where they had gone to smoke or shoot up. “My needle girls,” one woman cooed to them tenderly. “How are you, my loves?” Most made polite conversation, updating the workers on their health struggles, love lives, immigration woes or housing needs. One woman told them she would be going back to Angola to deal with her mother’s estate, that she was looking forward to the change of scenery. Another man told them he had managed to get his online girlfriend’s visa approved for a visit. “Does she know you’re still using?” Sareia asked. The man looked sheepish.

“I start methadone tomorrow,” another man said proudly. He was accompanied by his beaming girlfriend, and waved a warm goodbye to the girls as they handed him a square of foil.

In the foggy northern city of Porto, peer support workers from Caso – an association run by and for drug users and former users, the only one of its kind in Portugal – meet every week at a noisy cafe. They come here every Tuesday morning to down espressos, fresh pastries and toasted sandwiches, and to talk out the challenges, debate drug policy (which, a decade and a half after the law came into effect, was still confusing for many) and argue, with the warm rowdiness that is characteristic of people in the northern region. When I asked them what they thought of Portugal’s move to treat drug users as sick people in need of help, rather than as criminals, they scoffed. “Sick? We don’t say ‘sick’ up here. We’re not sick.”

I was told this again and again in the north: thinking of drug addiction simply in terms of health and disease was too reductive. Some people are able to use drugs for years without any major disruption to their personal or professional relationships. It only became a problem, they told me, when it became a problem.

Caso was supported by Apdes, a development NGO with a focus on harm reduction and empowerment, including programmes geared toward recreational users. Their award-winning Check!n project has for years set up shop at festivals, bars and parties to test substances for dangers. I was told more than once that if drugs were legalised, not just decriminalised, then these substances would be held to the same rigorous quality and safety standards as food, drink and medication.

In spite of Portugal’s tangible results, other countries have been reluctant to follow. The Portuguese began seriously considering decriminalisation in 1998, immediately following the first UN General Assembly Special Session on the Global Drug Problem (UNgass). High-level UNgass meetings are convened every 10 years to set drug policy for all member states, addressing trends in addiction, infection, money laundering, trafficking and cartel violence. At the first session – for which the slogan was “A drug-free world: we can do it” – Latin American member states pressed for a radical rethinking of the war on drugs, but every effort to examine alternative models (such as decriminalisation) was blocked. By the time of the next session, in 2008, worldwide drug use and violence related to the drug trade had vastly increased. An extraordinary session was held last year, but it was largely a disappointment – the outcome document didn’t mention “harm reduction” once.

Despite that letdown, 2016 produced a number of promising other developments: Chile and Australia opened their first medical cannabis clubs; following the lead of several others, four more US states introduced medical cannabis, and four more legalised recreational cannabis; Denmark opened the world’s largest drug consumption facility, and France opened its first; South Africa proposed legalising medical cannabis; Canada outlined a plan to legalise recreational cannabis nationally and to open more supervised injection sites; and Ghana announced it would decriminalise all personal drug use.

What Britain could learn from Portugal's drugs policy Read more

The biggest change in global attitudes and policy has been the momentum behind cannabis legalisation. Local activists have pressed Goulão to take a stance on regulating cannabis and legalising its sale in Portugal; for years, he has responded that the time wasn’t right. Legalising a single substance would call into question the foundation of Portugal’s drug and harm-reduction philosophy. If the drugs aren’t the problem, if the problem is the relationship with drugs, if there’s no such thing as a hard or a soft drug, and if all illicit substances are to be treated equally, he argued, then shouldn’t all drugs be legalised and regulated?

Massive international cultural shifts in thinking about drugs and addiction are needed to make way for decriminalisation and legalisation globally. In the US, the White House has remained reluctant to address what drug policy reform advocates have termed an “addiction to punishment”. But if conservative, isolationist, Catholic Portugal could transform into a country where same-sex marriage and abortion are legal, and where drug use is decriminalised, a broader shift in attitudes seems possible elsewhere. But, as the harm-reduction adage goes: one has to want the change in order to make it.

When Pereira first opened the CAT in Olhão, he faced vociferous opposition from residents; they worried that with more drogados would come more crime. But the opposite happened. Months later, one neighbour came to ask Pereira’s forgiveness. She hadn’t realised it at the time, but there had been three drug dealers on her street; when their local clientele stopped buying, they packed up and left.

The CAT building itself is a drab, brown two-storey block, with offices upstairs and an open waiting area, bathrooms, storage and clinics down below. The doors open at 8.30am, seven days a week, 365 days a year. Patients wander in throughout the day for appointments, to chat, to kill time, to wash, or to pick up their weekly supply of methadone doses. They tried to close the CAT for Christmas Day one year, but patients asked that it stay open. For some, estranged from loved ones and adrift from any version of home, this is the closest thing they’ve got to community and normality.

“It’s not just about administering methadone,” Pereira told me. “You have to maintain a relationship.”

In a back room, rows of little canisters with banana-flavoured methadone doses were lined up, each labelled with a patient’s name and information. The Olhão CAT regularly services about 400 people, but that number can double during the summer months, when seasonal workers and tourists come to town. Anyone receiving treatment elsewhere in the country, or even outside Portugal, can have their prescription sent over to the CAT, making the Algarve an ideal harm-reduction holiday destination.

After lunch at a restaurant owned by a former CAT employee, the doctor took me to visit another of his projects – a particular favourite. His decades of working with addiction disorders had taught him some lessons, and he poured his accumulated knowledge into designing a special treatment facility on the outskirts of Olhão: the Unidade de Desabituação, or Dishabituation Centre. Several such UDs, as they are known, have opened in other regions of the country, but this centre was developed to cater to the particular circumstances and needs of the south.

Facebook Twitter Pinterest A man receives clean syringes after being given methadone at a clinic in Lisbon. Photograph: Horacio Villalobos/Corbis via Getty Images

Pereira stepped down as director some years ago, but his replacement asked him to stay on to help with day-to-day operations. Pereira should be retired by now – indeed, he tried to – but Portugal is suffering from an overall shortage of health professionals in the public system, and not enough young doctors are stepping into this specialisation. As his colleagues elsewhere in the country grow closer to their own retirements, there’s a growing sense of dread that there is no one to replace them.

“Those of us from the Algarve always had a bit of a different attitude from our colleagues up north,” Pereira told me. “I don’t treat patients. They treat themselves. My function is to help them to make the changes they need to make.”

And thank goodness there is only one change to make, he deadpanned as we pulled into the centre’s parking lot: “You need to change almost everything.” He cackled at his own joke and stepped out of his car.

The glass doors at the entrance slid open to a facility that was bright and clean without feeling overwhelmingly institutional. Doctors’ and administrators’ offices were up a sweeping staircase ahead. Women at the front desk nodded their hellos, and Pereira greeted them warmly: “Good afternoon, my darlings.”

The Olhão centre was built for just under €3m (£2.6m), publicly funded, and opened to its first patients nine years ago. This facility, like the others, is connected to a web of health and social rehabilitation services. It can house up to 14 people at once: treatments are free, available on referral from a doctor or therapist, and normally last between eight and 14 days. When people first arrive, they put all of their personal belongings – photos, mobile phones, everything – into storage, retrievable on departure.

“We believe in the old maxim: ‘No news is good news,’” explained Pereira. “We don’t do this to punish them but to protect them.” Memories can be triggering, and sometimes families, friends and toxic relationships can be enabling.

To the left there were intake rooms and a padded isolation room, with clunky security cameras propped up in every corner. Patients each had their own suites – simple, comfortable and private. To the right, there was a “colour” room, with a pottery wheel, recycled plastic bottles, paints, egg cartons, glitter and other craft supplies. In another room, coloured pencils and easels for drawing. A kiln, and next to it a collection of excellent handmade ashtrays. Many patients remained heavy smokers.

Patients were always occupied, always using their hands or their bodies or their senses, doing exercise or making art, always filling their time with something. “We’d often hear our patients use the expression ‘me and my body’,” Pereira said. “As though there was a dissociation between the ‘me’ and ‘my flesh’.”

To help bring the body back, there was a small gym, exercise classes, physiotherapy and a jacuzzi. And after so much destructive behaviour – messing up their bodies, their relationships, their lives and communities – learning that they could create good and beautiful things was sometimes transformational.

My uncle and heroin: ‘What surprises me most – you have no teeth’ | Sarah Resnick Read more

“You know those lines on a running track?” Pereira asked me. He believed that everyone – however imperfect – was capable of finding their own way, given the right support. “Our love is like those lines.”

He was firm, he said, but never punished or judged his patients for their relapses or failures. Patients were free to leave at any time, and they were welcome to return if they needed, even if it was more than a dozen times.

He offered no magic wand or one-size-fits-all solution, just this daily search for balance: getting up, having breakfast, making art, taking meds, doing exercise, going to work, going to school, going into the world, going forward. Being alive, he said to me more than once, can be very complicated.

“My darling,” he told me, “it’s like I always say: I may be a doctor, but nobody’s perfect.”

A longer version of this piece appears on thecommononline.org. Research and travel for this piece were made possible by the Matthew Power Literary Reporting Award

• Follow the Long Read on Twitter at @gdnlongread, or sign up to the long read weekly email here.