Updated

Police in Northern Ireland on Saturday arrested two teenagers in connection with the fatal shooting of a 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 Saturday. No further information was immediately given.

Lyra McKee, 29, a rising star of investigative journalism, was shot and killed, 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."

Assistant Chief Constable Mark Hamilton said earlier that a gunman fired a number of shots at police during the unrest. Police on Friday night released closed-circuit TV footage showing the man suspected of firing the shots that killed McKee.

The killing reminded many of the decades of violence that plagued Northern Ireland before the 1998 Good Friday peace agreement. It was condemned by all the major political parties as well as the prime ministers of Britain and Ireland.

Speaking in Dublin, Irish Prime Minister Leo Varadkar said the people of Ireland and Northern Ireland had chosen peace and cooperation on Good Friday 21 years ago and will not be "dragged into the past" by political violence.

McKee 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 the post, 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, she 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."

"It has left so many friends without their confidante," she added.

The New IRA is a small group who reject 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 that did not cause any injuries in January. It is regarded as the largest of the splinter dissident groups still operating and has been linked to several other killings in the past decade.