Police blamed far-right agitators for starting the violence after a small group of anti-immigrant protesters arrived at the scene of the stabbing attack beside the main thoroughfare of O'Connell Street and clashed with police.

It took officers several hours to regain control after the crowd grew to around 200 to 300 people. A double decker bus, tram and police car were burned out, public transport shut down and people urged to stay away from large parts of the city.

"It was gratuitous thuggery," Chief Superintendent Patrick McMenamin said in a video statement on the social media platform X at 1130 GMT, declaring that calm had been restored.

"Some of my colleagues were also attacked and assaulted. Thankfully there were no serious reports of injury."

Dublin Fire Brigade said firefighters continued to damp down a smouldering tram on O'Connell Street on Friday morning and make the scene safe. Public transport resumed, but with restrictions in the area.

Barricades were still up across some streets and police stood guard outside a Foot Locker store with broken windows that was looted during the riot. The front of a Holiday Inn hotel that was also targeted was boarded up.

A five-year-old girl was receiving emergency treatment after sustaining serious injuries in the stabbing. A man in his late 40s, also being treated for serious injuries, was arrested by police who said they were not looking for any other suspect.

Police said on Thursday that they have not ruled out any motive, including whether it could be terror-related. They would not comment on the nationality of the detained man.

There are no far-right parties or politicians elected to parliament, but small anti-immigrant protests have grown in the last year. The government is reviewing security around parliament after a recent protest trapped lawmakers inside.

(Reporting by Padraic Halpin; Editing by Kate Holton)

By Padraic Halpin and Conor Humphries