Footage recorded on a mobile phone and shared widely on social media, shows a police officer wrestling with a man on the ground, before being punched and kicked in the Frampton Park Road area of Hackney, London.
Several men can be seen surrounding the policeman, including one with a baseball bat, before a female officer arrives who is also kicked and pushed.
One of the men is shown even dancing and taking selfies as the incident unfolds.
The officers had earlier been flagged down by a member of the public who said they had been assaulted and directed them towards the alleged suspect.
The Metropolitan police said that both officers suffered minor injuries but did not require hospital treatment.
A spokesperson said: “At approximately 15:30hrs on Wednesday, 10 June, officers on patrol in the Frampton Park Road area of Hackney were flagged down by a member of the public.
“They informed officers that they had just been assaulted and directed the officers towards the alleged suspect.
“As an officer attempted to speak with those involved, one of the men resisted and a struggle ensued. A number of other people became involved whilst the officer was on the ground.
“Two officers – a male and female police constable – were injured; they suffered minor injuries but did not require hospital treatment.”
The statement added that additional officers attended the scene and two men, aged 20 and 38, had been arrested on suspicion of police assault and remain in custody at an east London police station.
Home Secretary Priti Patel tweeted: “Sickening, shocking & disgraceful.
“My thoughts are with the outstanding @metpoliceuk officers who were subject to this disgusting violent attack.”
Mayor of London Sadiq Khan also condemned the attack, saying attacks on police officers would not be tolerated.
He tweeted: “Attacks on our police will not be tolerated. I urge anyone with information to come forward to ensure the perpetrators of this disgusting attack feel the full force of the law.
“These brave officers were doing their duty and assisting the public - I wish them a speedy recovery.”
John Apter, chairman of the Police Federation of England and Wales said the video of the assault on the police officers was “truly stomach-churning” and “horrific to watch”.
He told BBC Radio 4’s Today programme: “What is, without doubt, is that those officers were at serious risk and the bravery shown by the officers and the fear they must have felt is why I’ve gone so publicly.”