Image copyright BBC/Kudos/ Ed Miller

When you're 10 years old you can't legally drink, smoke, vote, get married or even buy a pet. You're in year five or six at primary school. You're legally a child.

But you can be put on trial as an adult for murder.

That's because in England and Wales, 10 is the minimum age of criminal responsibility - meaning a 10-year-old accused of killing someone can be tried like an adult in a Crown Court in front of a jury, rather than in the youth courts.

A few concessions are made based on their young age, including their first name being used, lawyers not having to wear wigs and gowns, and being allowed to sit close to their lawyer or an appropriate adult.

But can a child that young understand what it means to commit a murder? Are they responsible for their actions? And what happens to them later in life if you convict them as an adult before they even become a teenager?

Those questions are at the heart of 12-year-old Ray's story, which is told in new BBC drama Responsible Child - loosely based on a real-life case.

Ray, who loves playing video games, learning about space and watching reality shows, is on trial - alongside his big brother, Nathan, 21 - for a brutal murder.

After their abusive step-dad narrowly escapes prison for attacking Nathan with an axe, he returns to the overcrowded family home and starts being abusive to their mum. One night, the brothers go downstairs and stab him more than 60 times while he sleeps on the sofa.

It's an attack so frenzied they almost cut his head off.

The story is based on that of Jerome and Joshua Ellis, who were 14 and 23 when they also killed their step-dad.

Image copyright BBC/Kudos/ Ed Miller Image caption Ray's step-dad Scott (Shaun Dingwall) attacks his older brother with an axe

The drama shows the killing in its full horror: the blood, the knives, the fact their step-dad is unarmed and asleep.

But it also shows 12-year-old Ray - sensitively played by White Princess star Billy Barratt, who is also 12 - dazed, confused and covered in blood after it happens. He confesses to his crime almost immediately and is taken to the local police station.

There he's searched and his mug shot, DNA and blood are taken before he's locked up in a grim, adult cell. When his lawyer asks the police why a child like Ray has been treated like any adult criminal, the officer snaps back: "He's been detained for murder, not truancy."

'Pure evil'

The minimum age for criminal responsibility was set at 10 in England and Wales back in 1963.

Since 1995, it's estimated that over 7,000 children aged 10-14 have been tried at Crown Courts in England and Wales.

The United Nations has repeatedly said that setting it at this age ignores children's rights, and called for the age to be raised to at least 12. Ten is lower than in any other European country: in Sweden it's 15 and in Portugal it's 16. Even in China and North Korea you have to be 14 to be tried as an adult.

Our understanding of how the adolescent brain develops - and how that affects decision-making - has increased since the age limit was originally set, a recent government report points out.

And in 2010 a survey commissioned by the Prison Reform Trust of more than 2,000 adults suggested that two-thirds were in favour of raising the age of criminal responsibility to at least 12.

But others passionately disagree.

It's possible that they're against raising the age due to the horrific murder of two-year-old James Bulger by then 10-year-olds Jon Venables and Robert Thomson, in 1993. A grainy CCTV image of the tiny toddler being led away by the two older boys who abducted him from a supermarket is something few people who have seen it can forget.

It was a crime that shocked the nation, leading to headlines labelling the child killers "pure evil" and a heated debate about whether or not their violent behaviour was influenced by horror movies like Child's Play 3, which starred a killer doll.

James Bulger's mum, Denise Fergus, has spoken out in the past against raising the age. In 2010, the then-children's commissioner made a personal apology to her after suggesting in a newspaper article that the age of responsibility should be raised.

'They're actually the accused'

Responsible Child is the work of Skins writer Sean Buckley and documentary maker Nick Holt.

Nick hopes his first drama film will shine a spotlight on these questions.

He made his name working on gritty documentaries like Channel 4's The Murder Trial, which followed the case of a Scottish fruit and veg seller who murdered his wife. It was while working on that back in 2013 that his interest in the age of criminal responsibility was sparked.

Image copyright AFP Image caption Nick Holt (left) directing Billy Barratt, who plays Ray, and James Tarpey (Nathan)

"I was in Scotland for about 18 months, sitting in on various cases, and that's when I saw a very young child in a court during a serious assault trial. I asked the lawyers if the child was there as a witness, and they said 'No, they're actually the accused'. I was surprised.

"After that, I started asking more questions about the age at which people can stand trial in front of a jury for the most serious crimes. When it turned out it was 10, and I saw how it compared to other countries, I was even more surprised. It's substantially out of kilter with the rest of the world."

'He can't buy a hamster'

In Responsible Child, the prosecution's case hangs on the idea that Ray is a cold-blooded killer who deserves to go down for murder. But the defence argues that Ray's difficult life - his dad's drinking, his mum's depression, the violence and the fact his case was overlooked by social services - should be taken into account when considering his sentence.

It's a conflicting story: the sheer horror of the murder is on full display. But so is the turbulence of Ray's home life and his total devotion to his older brother - who their step-dad assaults in front of him.

While there's no suggestion that Ray - or any other child offender - shouldn't be punished for their crimes, the drama asks what that punishment should be and what the long-term impact is of treating kids like criminals.

Some of the most thought-provoking lines come from a child psychiatrist character, played by Stephen Cambell Moore, who is assigned to Ray's case. He questions if a child's brain is capable of fully understanding what it means to commit a murder.

"Ray isn't even allowed to buy a bloody hamster until he's 16," he says, referring to the fact that UK law doesn't allow you to buy a pet until that age.

Image copyright BBC/Kudos/ Ed Miller Image caption Ray's lawyer is played by Games of Thrones star Michelle Fairley (left)

Dr Tim Bateman, a youth justice expert, told Radio 1 Newsbeat that there are inconsistencies around how the law treats young people.

"Recently, there's been talk of raising the school leaving age to 18. It seems to me the time is also right to examine the age we start labelling kids as criminals."

Director Nick would like to see the age of responsibility raised to 16: "On the reading and research I've done, that seems a better age because the adolescent brain is a bit more developed."

'I don't want to be that person'

The impact of the James Bulger case can partly explain why Labour and Conservative governments haven't reconsidered the age that children can be tried as adults, says Dr Bateman.

"When you have a consensus on something like being tough on crime then it's difficult for either of the parties to do something which might be seen as soft."

But he thinks the public mood might be changing: "There's been a big shift in the way society deals with children's law-breaking in the past decade."

He points to the fact that there has been a 75% fall in the number of children being put through the court system in that time. And in Scotland, the decision was recently made to raise the age of responsibility to 12.

Image copyright BBC/Kudos/ Ed Miller Image caption Responsible Child's final scenes are set in a secure unit for young offenders

"I think there is enough distance between now and the Bulger case for us to say that whatever we thought at that time shouldn't bind us any longer," says Dr Bateman, although he is aware some might still disagree with that view.

In the final scenes of the drama Ray, who is now in a secure unit for young offenders, starts having night terrors and blood-soaked flashbacks of the murder. He also talks about not wanting to be "the person who did what I did".

But while the drama is set up so the viewer sees things through Ray's eyes, making it hard not to feel some sympathy for him, it's important to remember that what we are watching is scripted. "There are no easy answers when it comes to this case," says Nick.

"What I think Responsible Child does very well," says Dr Bateman, "is to persuade people that this issue, which some might have a knee-jerk response to, needs at least to be thought about."

Responsible Child is on BBC Two on 16 December at 21:00.

If you have been affected by any of the issues raised in this article help and advice is available here.

Follow Newsbeat on Instagram, Facebook, Twitter and YouTube.

Listen to Newsbeat live at 12:45 and 17:45 weekdays - or listen back here.