A number of gardaí were attacked and a garda vehicle set alight during protests near Parnell Square in Dublin following a knife attack on a woman and children in the area.
At least one garda was physically assaulted and others had fireworks thrown at them during the disturbances at the junction of O'Connell Street and Parnell Square East.
Some protesters were involved in scuffles with gardaí, while others threw bottles at officers.
A Dublin Bus vehicle and Luas tram were also set alight, while some shops were looted.
Irish Rail also closed Tara Street station for a number of hours.
Tánaiste Micheál Martin expressed his horror at the attack at the school which he described as an attack on the innocent.
He said such violence could not be tolerated.
We need your consent to load this comcast-player contentWe use comcast-player to manage extra content that can set cookies on your device and collect data about your activity. Please review their details and accept them to load the content.Manage Preferences
He also said it was unacceptable that people engaged in "wanton violence" on Dublin's streets and he called on them to desist.
He said the anger at yesterday's attack was understandable but it was important to allow gardaí to get on with the investigation.
Garda Commissioner Drew Harris described the protests as "disgraceful", and said a "hooligan faction driven by far-right ideology" had contributed to the trouble.
Speaking at Mountjoy Garda Station, he also said some people used the protests "for their own ends".
"I think there's disgraceful scenes in terms of a major investigation, the maintenance of a scene, the gathering of evidence," he said.
"We have a complete lunatic hooligan faction driven by far-right ideology ... engaged in serious violence.
"We are drafting in resources to deal with that. And that will be dealt with properly."
He appealed to those who had gathered there to "go home" and for people not to listen to misinformation on social media about the attacks.
Mr Harris said: "We ask people to act responsibly, not to listen to misinformation and rumour that's circulating on social media. The facts are being established but the facts are still not clear and a lot of the rumour and innuendo is being spread for malevolent purposes."
He said the five-year-old child and her family are going through a "terrible ordeal".
"Those scenes are disgraceful. I wish people would calm down, go home and allow us actually conduct our duties and investigations.
"This is is one part, people using this tragic tragic event, which is under investigation by the proper authorities, that is An Garda Síochána.
"They're using it for their own ends and there is frankly a hooligan faction, who are only interested in causing damage and mayhem in the city centre and they are using the opportunity for that as well."
He also said he could not rule out a terrorist motivation for the attack.
"I can't offer clarity at this moment in time as to what the motivation is, from whatever quarter it might be. I have to say at this moment in time all lines of enquiry, in effect motive, or the why, remains open.
"I'm not going to speculate any further in respect of a terrorist motive. I've never ruled out any possible motive for this attack. Until we're sure of the motive is then we have to keep an open mind as to why this happened."
Gardaí say the scenes were being driven by a far-right element whipping up anger and shouting anti-immigrant slogans, because they suspect the attack was carried out by a foreign national.
However, it is understood the suspect, who is being treated in hospital is an Irish citizen who came to this country over 20 years ago.
Specialist units, including the Public Order Unit, were deployed to the area.
All Dublin Bus and Luas services were suspended for the night.
The situation was brought under control shortly before 11pm, with Chief Superintendent Patrick McMenamin saying that there were no serious injuries reported during the unrest.
He said: "This evening significant levels of public disorder, criminal damage and violence was carried out by small groups of violent individuals in Dublin city centre.
"The violence had nothing whatsover to do with a serious assault that occurred this afternoon on Parnell Square.
"It was gratuitous thuggery, public transport was attacked as were garda vehicles and some commercial premises were were also damaged and attacked.
"Thankfully no serious injuries have been reported by the public as a result of tonight's violence.
"Some of my colleagues were also attacked and assaulted but thankfully again, no serious reports of injury being sustained.
"An Garda Síochána responded to an evolving situation, at its height involving 400 members of An Garda Síochána who remain on patrol in Dublin city centre.
"Dublin city centre is now calm and returning to normal and we will continue to monitor the situation.
"I want to thank the public for their support and patience during this evening’s operation.
"But our thoughts, of all members of An Garda Síochána remain with the victims of the violent assault which occurred earlier in Parnell Square today."
Additional reporting: PA