Irish Prime Minister Leo Varadkar said Friday that protesters who battled police and looted shops in Dublin after a school knife attack were motivated by "hate" and brought "shame on Ireland".

Thursday night's violence in the Irish capital -- which erupted after three children were wounded in the stabbings -- was of a level not seen in decades, according to police, who arrested 34 people.

"Those involved brought shame on Dublin, brought shame on Ireland and brought shame on their families and themselves," a visibly angry Varadkar told reporters, describing the rioters as "criminals".

"They did not do what they did because they wanted to protect Irish people. They did not do it out of any sense of patriotism, however warped.

"They did so because they're filled with hate. They love violence. They love chaos and they love causing pain to others," he added.

The unrest came after a five-year-old girl sustained serious injuries in a suspected stabbing in Parnell Square East, north central Dublin.

Two other children and two adults -- a woman and the suspected perpetrator of the attack -- were taken to hospital after the incident at around 1:30 pm (1330 GMT).

Rumours on social media about the nationality of the assailant, who police only described as a man in his fifties, helped fuel unrest following the attack.

Police blamed a "complete lunatic faction driven by far-right ideology" for the violence.

"As a country, we need to reclaim Ireland. We need to take it away from the cowards who hide behind masks and tried to terrify us with their violence," said Varadkar.

He promised that his government would use the "full resources of the law, the full machinery of the state to punish those involved in yesterday's grotesque events".

Varadkar added that he would pass new laws in the coming weeks to enable police "to make better use" of CCTV evidence they collected during the unrest.

He also said Ireland would "modernise" its laws regarding hate and incitement.