Police in Northern Ireland arrested two teenagers Saturday in connection with the fatal shooting of a young journalist during rioting in the city of Londonderry.

The men, aged 18 and 19, were detained under anti-terrorism legislation and taken to Belfast for questioning, the Police Service of Northern Ireland said.

The men have not been identified or charged. Police had said earlier that one gunman had pulled the trigger during the rioting but was backed by an “organization,” and said they were searching for multiple suspects.

Lyra McKee, 29, a rising star of investigative journalism, was shot and killed, police say probably by a stray bullet aimed at police, during rioting Thursday night. Police said the New IRA dissident group was most likely responsible and called it a “terrorist act.”

The use of a firearm apparently aimed at police marks a dangerous escalation in sporadic violence that continues to plague Northern Ireland 21 years after the Good Friday peace agreement was signed. The New IRA rejects the peace agreement.

Chief detective Jason Murphy warned Saturday that the situation has become more dangerous, even though community attitudes have changed since the peace agreement and the use of violence is viewed as abhorrent by the vast majority.

“What we are seeing is a new breed of terrorist coming through the ranks and that for me is a very worrying situation,” he said.

Assistant Chief Constable Mark Hamilton said earlier that a gunman fired a number of shots at police during the unrest that began Thursday. Police on Friday night released closed-circuit TV footage showing the man suspected of firing the shots that killed McKee and appealed to the public for help in identifying the suspect.

The footage shows police facing a barrage of gasoline bombs before the shots were fired by someone wearing a balaclava. The rioting started after police moved into the Creggan housing complex to search for weapons.

The killing was condemned by all the major political parties as well as the prime ministers of Britain and Ireland.

Floral tributes to journalist Lyra McKee at the site of her shooting death.

Paul Faith / AFP/ Getty Images

The European Union’s chief Brexit negotiator, Michel Barnier, said the killing was “a reminder of how fragile peace still is in Northern Ireland” and called for work to preserve the Good Friday peace agreement.

Some politicians believe uncertainty over Britain’s impending departure from the EU and the possible re-introduction of a “hard border” between Northern Ireland and the Republic of Ireland are stoking tensions in the region.

The victim was mourned by friends and the wider community. She rose to prominence in 2014 with a moving blog post — “Letter to my 14 year old self” — describing the struggle of growing up gay in Belfast, the capital of Northern Ireland.

In it, she described the shame she felt at 14 as she kept the “secret” of being gay from her family and friends, and the love she eventually received when she was finally able to reveal it.

She also had recently signed a contract to write two books.

Hours before her death, McKee tweeted a photo of the rioting with the words: “Derry tonight. Absolute madness.”

Her partner, Sara Canning, told a vigil Friday that McKee’s amazing potential had been snuffed out. Canning said the senseless murder “has left me without the love of my life, the woman I was planning to grow old with.”

Catholic priest Joseph Gormley, who administered the last rites to McKee, told the BBC that the rioting was “clearly orchestrated” by a “small group of people who want to play political games with our lives.”

He said he and other community leaders had tried to talk to the dissidents without success.

The New IRA is a small group that rejects the 1998 Good Friday agreement that marked the Irish Republican Army’s embrace of a political solution to the long-running violence known as “The Troubles” that claimed more than 3,700 lives.

The group is also blamed for a Londonderry car bombing in January and has been linked to several other killings in the past decade.