Two gangs of youths clashed outside a primary school, armed with axes knives and hammers, in front of terrified children.

Video footage, filmed by a quick-thinking pupil, captured the horrifying incident at Warren Evans Court in Cardiff.

One frightened boy hit in a neighbour's garden, as parents on the school run, at nearby Whitchurch High School, were caught up in the disturbance.

Adam Awan and Anthony O'Driscoll, both 18, were on opposing gangs and threatened each other before violence erupted around 3.30pm on January 19.

At Cardiff Crown Court, the pair were locked up for a total of 17 months.

In the video footage, the two gangs can been seen shouting and swearing at each other as they squared up on the street

Video footage, filmed by a quick-thinking pupil, captured the horrifying incident at Warren Evans Court in Cardiff

Adam Awan (left) and Anthony O'Driscoll (right), both 18, were on opposing gangs and threatened each other before violence erupted around 3.30pm on January 19

Sentencing two young men, the Wales Online reports that Judge Eleri Rees said: 'It is essential that all understand the courts will not tolerate this kind of behaviour.'

In the video footage, the two gangs can been seen shouting and swearing at each other as they squared up on the street.

Prosecutor David Pugh said Awan was the aggressor of the larger group.

The court heard he called out for a hammer, which he 'brandished'. O'Driscoll, dressed in a black jacket, went home to collect two axes.

Prosecutors said two other boys – who were dealt with in the youth court – were armed with an axe and a Stanley knife.

Another youth, who was not identified, was brandishing a belt.

One frightened boy hit in a neighbour's garden, as parents on the school run, at nearby Whitchurch High School, were caught up in the disturbance

The court heard he called out for a hammer, which he 'brandished'. O'Driscoll, dressed in a black jacket, went home to collect two axes

Witness Karen Bryant was picking up her daughter from school and saw a large number of children running around.

She saw a child with an axe and shouted: 'What are you doing with an axe?'

One witness found a distressed 14-year-old boy in his back garden. The boy said he had been chased by people with knives.

A further witness reported seeing about 20 pupils running past his home and later found a discarded axe on his roof.

Awan was sentenced to nine months detention in a young offender institution.

O'Driscoll, who pleaded guilty at an earlier stage, was given eight months.