Only the week before, she'd convinced herself he was going to be all right. "It was our summer holiday," says Joyce Young. "I looked at him there, playing in the sand on the beach with my niece, and I thought: he'll be OK. He's out of it. He's going to make it."

Until he was 13 or 14, James had been "a lovely boy. Just a gem. You couldn't want for a nicer kid". The family lived in Blackhill, a notoriously deprived area of Glasgow, but "there was never a problem, rarely a cross word".

Then he went to secondary school, and fell in with a gang of older boys, and everything changed. He became unmanageable; stayed away for days at a time, coming home drunk, or hurt, or both.

Joyce, a midwife, and her husband, a van driver, battled on. Statistically, James wasn't particularly high risk: he had two parents, both were in work, neither drank nor did drugs. "I'd clean him up, talk to him, and for a few days he'd be James again," says Joyce.

Together they had got him through a basic skills college, for kids who had failed at school. At 18, he had landed himself an apprenticeship. "The cogs in his brain," says Joyce, "were starting to turn." The family holiday had been grand. It was August 2007.

Then at 12.30pm on 20 August, Joyce's sister from across the road came running up, distraught. It's James, she said. He's been stabbed. Joyce ran the couple of blocks to where her son lay. She knew as soon as she saw him it was bad; the way his eyes looked.

In the hospital after surgery, she had spent five hours at his side. For an argument over a stolen lawnmower, James had been stabbed five times: in the shoulder blade, the ribs and, finally, in the back. "He ran," says Joyce. "He made it as far as his gran's front gate. But it was jammed. So that was the one that did for him. A kitchen knife, through the aorta."

That year, James was one of 63 youths who died a violent death in Glasgow, victims of a gang culture that has reigned on the city's bleak and blighted housing schemes since the 1930s and earlier. There's petty theft and vandalism and drug-dealing, but this is basically fighting, not organised crime. The gangs fight over their patches out on the estates, defending territories that may encompass three streets, staked out by graffiti.

On Friday and Saturday nights, they have brought their violence into the city centre, waging running battles on busy thoroughfares such as Sauchiehall Street with knives, screwdrivers, even swords and machetes. Unperturbed, evening shoppers stroll by. The police have CCTV of this, kids fighting and dying: the violence is swift, casual, utterly shocking.

Quite suddenly, though, there's less of it than there was. Glasgow is no longer the murder capital of western Europe. Violent crime among some gang members has halved; among many others it's down 25%. The lever for this change has been a programme driven by a slight but passionate woman called Karyn McCluskey.

McCluskey, 45, is a former nurse and qualified forensic psychologist. Born in a council house in Falkirk, her father was a train driver, until he decided to go to university. She has a sister who flies Lear jets in America, and another who's a top-flight academic in Northern Ireland. McCluskey, people tell you round here, doesn't do impossible.

By the time Joyce Young came across her in 2008, McCluskey had been with Strathclyde police for six years. She had arrived as head of intelligence analysis from West Mercia police, a force responsible for nearly 3,000 square miles of rolling countryside across Shropshire, Herefordshire and Worcestershire that witnessed, on average, two murders a year. When she got to Glasgow in 2002, the city was notching up 70-plus.

McCluskey woke up to what was happening, she says, when she read a story in the Daily Record, about a young boy who had been stabbed to death and a 74-year-old woman who came out and held him in her arms while he died: "He bled to death crying for his mum. I sat back and waited for the public outrage, and there wasn't any. Nothing. And I thought: not right."

Others were thinking the same. Crackdowns, increased foot patrols, stop-and-search, lockups plainly weren't working. The city authorities, police and public health services were looking for an answer. With a similarly enlightened and driven colleague, a grizzled veteran with 30 years' experience in homicide, drugs and organised crime called John Carnochan, McCluskey set up the Strathclyde police's Violence Reduction Unit (VRU), now known as the Scottish Violence Reduction Unit.

Their early research revealed some alarming facts: 170 street gangs existed across the city, with as many as 3,500 members aged between 11 and 23. Comparing police reports with the accounts of trauma surgeons and A&E staff showed as many as two-thirds of knife crimes were not being reported to the police. Every six hours in the city, someone suffered a serious facial injury.

"I could show you pictures of young boys of 14, you could put your hand through the slash in their cheek," says McCluskey. "A Glasgow smile, it's called. They're not going to get a job carrying bags at the Hotel Malmaison, are they? Probably not a girlfriend either."

The unit's big moment, McCluskey says, was understanding that violence works "like an infectious disease. It's passed on. You can catch it. You might live and die in a square mile. Your life is not predictable or manageable. You may have alcoholic parents, suffer domestic violence. Nobody cares about you. You're incapable of empathy: hard-wired for violence."

They coined a phrase: recreational violence. "There's also the thrill, the sensation-seeking," McCluskey says. "You look at their faces on the CCTV, they're loving it. They're young guys just not equipped to make good decisions for themselves, caught up in the gang dynamic."

So, if they see themselves as a group, treat them as a group, reasoned McCluskey. She went to the United States and met a man called David Kennedy, whose model for tackling gang violence had worked in Boston since the late 1990s. In the jargon, it's known as a "focused deterrence strategy", harnessing a multitude of different agencies plus resources from within the community. McCluskey set about bringing it to Glasgow.

The VRU's Community Initiative to Reduce Violence (CIRV) came into being in October 2008. It has three basic components: a zero-tolerance police warning that if the violence doesn't stop, life is going to get very tough for every single gang member; a pledge from assorted agencies and charities that if youths do renounce violence, they can get help with education, training, job-finding; and a powerful, personal message from people like Joyce.

All this is laid out at a kind of forum, held in a city-centre courtroom. These are called call-ins, and there have been 10 of them so far. They are, says Carnochan, "truly electric. I've never been anywhere like them. You've got 40, 50, 60 guys sitting there, joshing, full of themselves, and slowly the atmosphere changes. Slowly, they fall quiet."

First up is a senior police officer, in uniform, who reads the riot act, accompanied by CCTV footage and mugshots projected on to a screen behind him where they leave gang members in no doubt that the cops know exactly who they are and where to find them.

Next comes a doctor. Sometimes this is Christine Goodall, an oral surgeon who spent 15 years treating facial trauma caused by violence: bruisings, lacerations, deep incise wounds, knocked-out teeth, broken jaw or nose, bites ("A lot of people," she says, "get a bit of ear chewed off. A lot have had what in Glasgow they call 'a good kicking'.")

Founded with two other surgeons and McCluskey's support in 2008, Goodall's charity, Medics Against Violence, sends volunteer doctors with professional or personal experience of violence into Glasgow's secondary schools; they have spoken to 8,000 children in the past three years. It also trains medics to make good use of the rare "teachable moment" that can occur after someone has been on the receiving end of violence.

At CIRV call-ins, Goodall says, "we show them pictures, quite graphic. We explain to them what they're looking at, and tell them what goes on in A&E. We explain what this might mean for them, later. Plastic surgery, for example, can do a lot – but you're always left with a mark. You'll always be perceived as hard, even if it wasn't your fault."

A former gang member will speak next. James got two years for slashing a guy when he was 15, and had landed a culpable homicide conviction ("He was battering me; I couldn't let it go. We started fighting; fell under a bus. He lost his life") by the time he was 20. There is, James says, "nothing like experience. It's worth a lot more than opinion."

James grew up in an alcoholic home. His parents were unpredictable, often violent. "It wasn't a house where you spoke about how you felt," he says. "You didn't learn to process your emotions." He was fighting as soon as he started school, in trouble with the police when he was seven. Breaking into shops, setting cars on fire, selling drugs. And always fighting, fighting.

At 13 he was in a gang: "It's fear that drives you," he says. "I understood that, eventually. It was a trauma counsellor who made me see it, after my pal died. All this is fear-driven. When you're frightened you bottle stuff up, you trust no one. No one at all. In a gang you feel secure, you get recognition. Gangs meet these kids' needs."

So at the call-ins, James, now a thoughtful 33-year-old, tells what he knows: what prison is like, how it feels to be responsible for someone's death, how – despite being, unquestionably, rehabilitated – he hasn't had a job offer since prison: "Who'll look at a guy with a culpable homicide conviction? The job centre says I'm flogging a dead horse."

He was moved to straighten up, he says, "because I wanted to be a good dad to my daughter. She's eight now, and has never once seen me drunk". He's happy to work with the CIRV because "they said they needed me. These boys, they don't know what lies ahead of them. Someone has to tell them. And they can't say to me, what do you know? You don't understand. Because I do."

Towards the end of the call-in comes Young, or another bereaved mother. Young, now 39, approached McCluskey because "James died for nothing, and I felt I had to do something. The thing is, they always caught the killers. The guy who stabbed James to death was picked up the next day; charged, convicted, 15 years inside, no problem. The murder detection rate here is 99%. But it wasn't stopping the violence."

The first time she stood up at a call-in she felt sick, she says: "I'd tried to do cards and bullet points and everything, but it didn't work. In the end I spoke from the heart. And you could see the change come over them; see the penny drop. They were looking, but not looking. Thinking, that's someone's mum. That could be my mum."

But you mustn't think, interjects McCluskey, that the call-ins are the end of it. "They're just the start," she says. "Afterwards the police enforcement has to be exemplary; they really have to feel we're on their backs, we mean it. Then you have to get all the services behind you, the colleges on board, mentoring in place, co-ordinate everyone. It's hard. We make no apologies for making life difficult for people. It's much easier to do nothing."

The CIRV programme cost some £4.8m over its first two years, with funding provided by the Scottish government and from partners and services in kind. McCluskey points out that with the most straightforward murder inquiry costing £1.3m, and a year in prison working out at £49,000, "we don't have to prevent many killings for it to become worthwhile."

For Carnochan, the CIRV "isn't just an initiative, it's a way of changing the way everyone works. It's putting agencies together that have never previously talked, clearing away the old barriers, really sharing and co-operating. Case-managing."

However you define it, the results have been startling. Among the nearly 500 gang members from eastern Glasgow who have engaged with the CIRV since late 2008, violent offending has fallen by 46%, all other types of offending by 34%, weapon possession by 85% and involvement in gang fighting by 73%. Equally impressively, there seems to have been something of a ripple effect: even among gang members who haven't been called in, violence is down 24%.

The scheme, now formally taken over by Strathclyde police, has been extended to north Glasgow. Police forces around the country are interested. McCluskey and Carnochan are frequent visitors to Scotland Yard; Theresa May, the home secretary, has been to Glasgow. After this summer's riots in England, David Cameron told parliament he wanted the principles and methods pioneered in Strathclyde to be made "a national priority".

McCluskey, meanwhile, is busy taking her brief further. "You can ask any grandmother out on the estates, and she'll tell you exactly what the problem is," she says. "It's the parents, she'll tell you. The families."

So parenting and early-years programmes are now high on McCluskey's agenda. She sends me off to a remarkable place in the south of the city called the Jeely Piece Club (the term is Glasgow slang for a jam sandwich). It runs a bright, busy play centre for children up to 12: parents can drop kids off there – £1.50 or £2 for a session of a couple of hours – or put them on a special Jeely Piece bus that criss-crosses the Castlemilk estates.

Just down the road is the club's pre-fives family centre, for babies from six weeks old and their parents. Half of the children here are classified as vulnerable: at risk of being put on a child protection register, or already on it. Violent behaviour, punching and slapping and biting, can emerge as early as two, as can silent withdrawal.

Many of the mothers (and occasional fathers) the staff and volunteers see here suffer from depression, alcohol or drug addiction and domestic abuse, says Liz Porter, a senior outreach worker. Staff run intensive parenting sessions for adults willing to engage, and specially devised one-to-one play sessions with children.

"It's about learning how to identify, articulate and process your own emotions," Porter says. "And about understanding how other people feel, and being able to respect that." The words echo McCluskey's: "At the end of the day, it's empathy. Empathy is what keeps us together. It's all really about people getting on with other people. And if you bring a kid up in a war zone, you're going to get a warrior."

• This article was amended on 20 December 2011 to clarify that Strathclyde police's Violence Reduction Unit (VRU) is now known as the Scottish Violence Reduction Unit.