A 12-year-old boy was arrested in Liverpool following the attack. (Pexels)

Police have arrested a 12-year-old boy on suspicion of assault after a homophobic knife attack in Liverpool on Saturday (June 22).

Two men in their 30s were walking home down Manningham Road in Anfield, Liverpool, 9.20pm when they were assaulted.

Police said that three boys were involved in the attack, aged between 12 and 15.

The boys made “homophobic insults” at the two men, before one of them took out a knife and attacked them.

One of the men suffered serious but not life threatening injuries to his head and neck.

The 12-year-old boy is being held in custody on suspicion of homophobic aggravated assault.

According to the BBC, Merseyside Police said the two men had been “left incredibly shaken by the incident,” and detectives have urged witnesses to come forward with information.

“This was an appalling and unprovoked attack on two men simply making their way home,” said Detective Inspector Tara Denn on Sunday.

“The hate and violence that has been inflicted on them is simply unacceptable and won’t be tolerated on the streets of Merseyside.”

“We will continue with that message and shout down this kind of behaviour,” said Liverpool Pride co-founder

Co-founder of Liverpool City Region Pride Foundation, John Bird, told BBC 5 live on Monday (June 24) that is was “scary” that young people are “capable of such hatred”.

He said: “The age of the people involved just hammers home education is vital..

“All the leaps and bounds we have had in the UK – marriage and adoption rights… and 50 years on from the Stonewall Uprising… You would think we were past all this.”

Bird also said that this year’s Pride in Liverpool would continue as planned on Saturday July 27 with the theme “come as you are.”

“We will continue with that message and shout down this kind of behaviour,” he added.