On a spring afternoon last year, a 13-year-old boy called at the home of Ana Kriégel, a 14-year-old girl living in the Dublin suburb of Lucan.

He had exciting news: his friend, whom she had a crush on, wanted to meet her. Ana was delighted. She grabbed her hoodie and followed him through a park to a derelict farmhouse where his friend, also aged 13, was waiting. It was a trap.

The object of her affection had prepared for this moment, assembling what police would later call a “murder kit”: zombie mask, black gloves, shin guards, knee pads. His weapons were a long stick and a concrete block.

What unfolded inside that house led last week to both boys, now aged 14, becoming the youngest people in Irish history to be convicted of murder. The case has shocked Ireland and evoked comparisons to the 1993 James Bulger atrocity.

“What has shaken our fundamental assumptions about childhood is that the convicted perpetrators of this crime are children themselves,” said Chris McCusker, a lecturer in clinical psychology at University College Cork. “It invites a lynch-mob mentality, fuelled by assumptions of evil in our midst.”

Social media – in its worst form – bookends the case.

Ana had few friends and was lonely. She sought to connect with peers via YouTube, Instagram, Facebook, Snapchat and other platforms only to end up bullied – targeted for sexual innuendo and threats. One comment on her YouTube channel expressed a desire to “have her executed”.

Her offence was to be slightly different: adopted from Russia, she was tall, striking and had poor short-term memory, eyesight and hearing, the latter the result of a tumour she’d had removed. She was deemed socially awkward, a “weirdo”.

Social media abuse dehumanised her and now, in death, seeks to avenge her. Threats last week rained on her killers and their families – at anyone deemed players in her tragedy.

Citing the Children Act that prohibits identification of minors accused or convicted of a crime, the trial judge, Justice Paul McDermott, banned identification of the boys. The boy who brutalised – and sexually assaulted Ana – is known as Boy A; his friend who delivered her to the farmhouse, Boy B. Both denied the charges.

Cyber-vigilantes have flouted the ban by naming the pair and posting their pictures on Twitter and Facebook, along with lurid incitements. They have also made threats against their families, a teacher and other boys wrongly identified as the killers. A lawyer for Boy B said the family had gone into hiding.

Detectives from the Garda station in Lucan who carried out the murder investigation are now hunting the would-be avengers, who could face up to three years in jail.

Twitter and Facebook – accustomed to red-carpet treatment by the authorities in Dublin, where they have their European headquarters – have been sucked into the imbroglio.

Representatives from both companies were summoned to a court hearing on Thursday to face contempt of court accusations over the publication of photographs identifying the killers.

Lawyers said the companies could not block in advance what users posted nor pre-empt naming of the boys since the companies did not know the boys’ names.

Justice Michael White upheld an injunction requiring the companies to remove any material identifying the boys but tweaked the wording so that they are expected to act after being made aware of such material. He branded social media users who identified the killers as “idiots” and urged the police to pursue them “with vigour”.

It is a fraught, messy aftermath to a case that will haunt Ireland.

Tusla, the state’s children and family agency, issued guidance for parents unsure how to discuss it with children.

“The trial may elicit a range of feelings such as shock, anger, upset, feeling unsafe, or difficulty in trusting others. Children and young people … may need reassurance that these feelings are normal … [and] may need help to express their feelings of sadness and bewilderment as to how this could happen.”

Ana’s parents Patric and Geraldine Kriégel leave Dublin’s Central Criminal Court after the guilty verdicts were announced. Photograph: Niall Carson/PA

A seven-week trial filled with harrowing details left adult observers feeling the same way. The judge thanked the jury members for their service and excused them further service for life.

Ana was born in February 2004 in Novokuznetsk, in western Siberia. She was adopted two years later by Geraldine and Patric Kriégel. Geraldine was a manager at the state transport company. Patric taught French at Dublin Institute of Technology.

Ana enjoyed primary school but a teacher expressed fear her innocence and distinctiveness would attract mockery in secondary school.

The bullying soon followed, and it was merciless. Ana was derided for having a “fake mam and dad”, sexually harassed, shunned. “You would see other girls walking in groups, and Ana would be walking alone,” Geraldine told the court.

“People didn’t understand her. She was unique and full of fun,” said Patric. “She said she felt invisible.”

Ana set up fake accounts from which she sent bullying messages to herself – expressions of pain and yearning for attention, according to her parents.

Boy A appeared an unlikely murderer. Described by teachers as courteous and intelligent, he was said to be from a stable middle-class home.

After the killing, however, police discovered disturbing material on his electronic devices including more than 12,000 pornographic images, many depicting sexual violence, plus searches for torture methods and “abandoned places in Lucan”.

Boy B told detectives that a month before the murder, Boy A approached him. “He came up to me and said, ‘Hey, wanna kill somebody?’ I said no. He replied with, ‘Ah, here. Why not’. [I said] because it’s retarded. I then asked him who he was planning to kill and he replied ‘Ana Kriégel’.”

Boy B called at Ana’s home at 4.55pm on 14 May 2018 and said Boy A wished to meet her. Leaving the house she smiled at her father and said: “I won’t be long.”

Boy B led Ana through a park to Glenwood House, an abandoned property. He told detectives he fled when Boy A began attacking Ana. He heard her scream.

Ana was a dream come true for us and she always will be Ana Kriégel's parents

Prosecutors said forensic evidence showed she fought for her life. The jury was shown a concrete block and metre-long stick stained with her blood. Builder’s tape was looped around her neck. There were about 60 areas of injury to her body. Boy A’s semen was found on a torn top.

When questioned both boys denied any knowledge of the killing.

Boy A denied involvement even after police found the “murder kit” in a backpack at his home. Told Ana’s blood had been found on his boots, he replied: “Are you joking me? Are you actually being serious?”

Court nine in the Criminal Courts of Justice was hushed when the verdicts came last Tuesday. Members of the Kriégel family held hands, hugged and sobbed.

Boy A appeared upset. His father held his hand. His mother wept.

Boy B bowed his head and hugged his mother. His father stormed out, slamming a door, then returned and gave a slow handclap in protest, saying: “An innocent child is going to prison.”

Both boys were remanded into custody pending probation reports and sentencing. In Ireland, children convicted of crimes are seldom sentenced to more than three years but for serious crimes judges have discretion to impose longer sentences.

The taoiseach, Leo Varadkar, said the government will study a UK plan to restrict access to pornography.

McCusker, the clinical psychologist, said the internet and social media were infiltrating consciousness and in some cases normalising sexual violence. “That Pandora’s box is not easily closed, and it continues to spew its contents … what do the emergent and often confused psyches of teenagers have to filter against this assault?”

A toddler from Russia who became Irish, a vibrant, vulnerable teenager who loved to sing and dance and craved friendship but ended up bullied and murdered: Ana Kriégel’s fate shames and bewilders Ireland.

Speaking to RTE as they left the court it was left to her devastated parents to find a glimmer in the darkness. “Ana was a dream come true for us and she always will be.”