Shots were fired at armed police from a car and one officer was hurt during a chase through the streets of London.
Officers responded to reports of people in a black BMW armed with a gun in Lascelles Close, Leytonstone, at about 22:45 BST on Thursday.
Shortly after a car failed to stop for officers who set off in pursuit.
Scotland Yard said "a number of shots were fired towards officers" and police also opened fire. Four people have been arrested.
The BMW came to a stop in Bective Road about 30 minutes after police were called.
Four men - aged 20, two aged 21, and one aged 22 - were arrested on suspicion of attempted murder and possession of a firearm with intent to endanger life.
One officer received minor injuries but nobody else was reported hurt.
Ch Supt Richard Tucker said police had "put themselves in danger to protect the public".
"This is just one example of the danger officers put themselves in day in, day out, to protect Londoners," he said.
What is believed to be a shotgun was recovered from the scene along with face masks.
Ch Supt Tucker added that extra officers would be in the area over the weekend "to provide reassurance to the community".
The Metropolitan Police Federation, which represents officers in the capital, said the shooting highlighted "the dangers our members face."