This is the unbelievable moment six police officers in Barcelona were injured when a riot broke out in the middle of a street in the early hours of the morning.

Six members of the elite Spanish force, Los Mossos d'Esquadra were set upon by an angry crowd of around 20 residents - many of whom joined in while still wearing their pyjamas and nighties.

In the shocking video, one woman in a pink spotted dressing gown is seen waving her arms around at the policemen before joining the melee and assaulting an officer.

Mobile phone footage captures the shocking moment six police officers in Barcelona were injured when a riot broke out in the middle of a street in the early hours of the morning

One of the officers suffered three blows to the head, another a cut on the eye and the others various cuts and bruises. The video shows the injured police officers sitting on the road.

The fracas broke out in the Hospitalet de Llobregat district of Barcelona when four policemen answered a call saying a group of people were trying to overturn a car with the driver still inside.

Three patrol cars also went to the scene, by which time the baying crowd had stopped their attempt to up-end the vehicle and the terrified driver had made his escape.

'It seems the four people who were trying to overturn the car might have been high on some sort of substances,' said a police spokesman.

Many of the mob were still wearing their pyjamas and nighties - some were barefoot

When officers tried to calm them down, they warned they would ask residents for help which they did, using their mobile phones to send text messages.

Local people then came out on to the streets wielding sticks and blunt objects and at one stage, the officers were surrounded by about 20 rioters.

Around 20 police officers were needed to control the brawl.

'Four of the six wounded officers have suffered heavy bruises due to attacks with sticks and blunt objects,' said the spokesman.

'The other two have had stitches in their heads due to the wounds suffered during the fight.'

The fracas broke out in the Hospitalet de Llobregat district of Barcelona when four policemen responded to a call saying a group of people were trying to overturn a car with the driver still inside

One shocked onlooker who recorded the scenes from his balcony said he heard people chanting; 'Kill that cop!'

At 5am, further police arrived and two arrests were made. More are pending over the coming days.

The police union of Los Mossos, SAP-Fepol, has described the attack as totally unacceptable and is demanding zero tolerance against police assaults.

They say everyone should know the seriousness of attacking the police and the courts should impose tough sentences as a deterrent.