Twitter and Facebook have said they will take action over an online hate campaign directed at a journalist who saw her colleague Lyra McKee shot dead in Northern Ireland.

Twitter, Facebook and YouTube had all been accused of failing to act to protect Leona O’Neill, who has been subjected to a torrent of abuse from conspiracy theorists and internet trolls after witnessing her friend being killed by a New IRA gunman in April. The abuse included accusations she had made up her account and even that she was responsible for the killing.

McKee’s murder during riots in Derry grabbed worldwide attention as she was the first reporter to be killed on duty in Northern Ireland since the Sunday World investigative journalist Martin O’Hagan was shot dead by loyalists in 2001.

At her funeral in Belfast a priest used the gathering to urge politicians in the congregation to restore the power-sharing government in Northern Ireland.

O’Neill, a freelance journalist and Belfast Telegraph columnist, had accused the social media corporations of failing to act after she complained about the smears and threats against her on their platforms.

A spokesperson for Twitter said it would act against the “abuse and harassment”. “Our teams are monitoring the situation and will take action when we identify behaviour which violates our rules. As always, we encourage people to report potentially violative content directly to us so we can take swift enforcement action.”

A mural of Lyra McKee in central Belfast. Photograph: Paul Faith/AFP/Getty Images

Facebook confirmed it had “taken down a number of posts … for violating our community standards against harassment, specifically in relation to targeting anyone with claims that a violent tragedy did not occur”.

YouTube said it would not comment on any specific videos that had targeted O’Neill.

The Derry-based journalist said she had been left with “night terrors, panic attacks and unable to sleep for weeks and weeks on end”. She said she told police about a number of people in her home city who had joined in the online attacks as she feared for her family’s safety.

“I have increased security measures at my home and indeed when I am out in the field,” she said. “I shouldn’t have to do this, but I am a mother of four children and need to protect myself. I can’t understand why people are targeting me in this way. What I did to seemingly vex them was witness a murder, the worst thing I have ever experienced in my entire life. It broke me, genuinely, and I am still struggling to deal with it.”

She said that within days of witnessing her friend’s murder, accusations began that she had made up her account of the killing.

One rightwing internet conspiracist from Canada tried to link a visit to Derry on the same day by the senior US Democrat Nancy Pelosi to O’Neill and to McKee’s death.

“The harassment started two days after Lyra’s murder. I was alerted to individuals sharing a Canadian conspiracy theorist’s video containing my video coverage of that night. This person cast doubt on the murder actually happening and implied that I was part of a false-flag coverup and my supposed lack of information – as in not naming the victim, or the gravity of her condition before her loved ones found out – somehow fed into this theory,” she said.

“At this stage I was already severely traumatised by what I had seen, hadn’t slept in several days and was being bombarded with tweets calling for my arrest, saying I was a liar, saying that I wasn’t even there or that I was working for some shady organisation that arranged the murder of a journalistic colleague as a sacrifice to American politician Nancy Pelosi. I have had people saying I murdered Lyra and was going to murder them too.”

O’Neill added: “I have reported the issues to Twitter, Facebook and YouTube. Twitter told me that the Canadian conspiracy theorist did not break their rules.

“I hope they act and deal with these dangerous platforms spreading false, harmful content that has resulted in me fearing for my safety and having to take the matter to the police.”

She said the abuse was a “virtual kicking” at the lowest point in her life.