A care worker and amateur tattooist has been jailed for at least 33 years for murdering a 13-year-old girl after she threatened to reveal that he had been sexually abusing her for more than a year.

Stephen Nicholson, 25, a lodger at Lucy McHugh’s family home, lured the teenager into woods in Hampshire and stabbed her 27 times before hiding the weapon and trying to burn the clothes he had been wearing.

During his sentencing hearing at Winchester crown court the judge, Mrs Justice May, questioned why social services had not stepped in even though concerns had been raised over Lucy.

It also emerged that Nicholson had been detained as a teenager for holding staff and youngsters at a children’s home hostage at knifepoint and was later given a further sentence for trying to stab a detention officer.

Jailing Nicholson for life, Mrs Justice May said Lucy was vulnerable and “easy prey”. She said an image of Lucy caught on CCTV before she went to meet him was heartbreaking, and described the attack as “particularly ferocious and brutal”.

Facebook Twitter Pinterest Lucy McHugh. Photograph: Hampshire police/EPA

Detectives believe Nicholson carefully plotted the murder, characterised in court as an “execution”, to silence Lucy, and meticulously planned his attempt to get away with it.

After Lucy vanished, Nicholson sent her mother an apparently supportive message in which he told her to keep her chin up and coolly got on with a DIY project to convert a shed into a house for his pet snakes, which included a 2.7-metre (9ft) boa constrictor.

May told him: “This was a pitiless attack on a child following months of sexual exploitation.”

She added: “Lucy was described as bright, bubbly, intelligent and eager to learn. Her grandmother said her nickname was Brains because of how quick she was.

“It seems Lucy developed a crush on Nicholson. Instead of rebuffing her, he encouraged her to continue her interest in him. He took full advantage. Nicholson used and abused Lucy. She had ceased to be of interest to him and had become an obstacle to his comfortable life.

“There was also the real risk of her making good on her threat to out him as a paedophile. As far as he was concerned, she had to go.”

A serious case review is under way to examine what contacts agencies had with Lucy, after it emerged that schools had twice flagged up to social workers’ concerns that she was spending time unsupervised with older men. It appears that no action was taken.

The judge said: “The question is how social services could have arrived at that conclusion not once but twice given what Lucy had told friends and what Nicholson has been convicted of.”

William Mousley QC, prosecuting, told the court that Nicholson had been sentenced when he was 14 to two years for holding staff and youngsters at a children’s home hostage at knifepoint.

While under the influence of amphetamines, he took both adult staff members hostage and held a knife to the throat of a female worker before corralling the youngsters into the same room.

Mousley added: “He said he was intoxicated and experienced a feeling of power when he committed the offences.”

The prosecutor said that Nicholson was given a further year’s detention when he barricaded himself into a canteen at a young offender institution with three other inmates.

He said that Nicholson “tried to stab a staff member” and explained he launched the disturbance as a form of protest against the terms of his release.

The case has also focused attention on how difficult it is to obtain details of Facebook messages even following the most serious of crimes. It was only as the trial started, almost a year after Lucy’s death, that confirmation finally came through that she and Nicholson had communicated via Facebook shortly before she was killed.

Nicholson was also jailed in August 2018 for 14 months for refusing to reveal his Facebook password to police investigating Lucy’s murder. A Facebook spokeswoman said it had worked closely with the police over the case.