Two men were jailed for 14 years each after a man was shot dead during a suspected bid to spring them from a van en route to court.
He was killed just yards from Wood Green Crown Court in north London after Metropolitan Police officers surrounded a car.
Armed officers from the Metropolitan Police swooped as Izzet Eren, 32, and Erwin Amoyaw-Gyamfi, 29, were due to be sentenced for planning what was described in court as a "professional hit".
The man who was killed is believed to have been near the back entrance to the court building when he was fired upon.
Scotland Yard said the operation was not related to terrorism, but would not confirm whether the man was shot by police.
Armed police wearing balaclavas and in unmarked 4x4 vehicles carried out the "intelligence-led" operation at around 9am on Friday.
Scotland Yard said four men aged between 19 and 31 were arrested on suspicion of conspiracy to facilitate escape from lawful custody.
A 30-year-old and a 19-year-old were held by armed police in the Bracknell Close area, while a 31-year-old and a 25-year-old were detained in nearby Barratt Avenue. They are currently being questioned at separate police stations.
Witness Nick Lindsay, a workman who was surfacing a road nearby, said the man who was shot was sitting in his car when police moved in.
He told Sky News: "The police all came down, they all jumped out of cars with their guns and said 'Get down', and then there was a smash, then the gunshot went off. By that time police officers grabbed us to move us out of the way."
Mr Lindsay said the incident was over in 10 to 15 seconds, but the man had been in the car for around 30 minutes before the police swooped.
He said: "He was parked there for easily half an hour, I would have said, because he was there when we first turned up this morning. He must have been there at least half an hour, minimum."
An air ambulance was called to the scene, where police earlier cordoned off a section of road around the junction of Bracknell Close and Olympus Grove, near Winkfield Road.
Paramedics fought to save the man but he died before he could be taken to hospital.
A white forensics tent was erected near an ambulance in the residential street, which is lined on either side with cars, and plain clothes officers were seen with evidence bags.
The Directorate of Professional Standards - the Metropolitan Police's internal watchdog - is investigating, along with the Independent Police Complaints Commission (IPCC).
IPCC representatives will attend a post-incident debrief, in which the officers involved will give an account of what happened during the shooting.
Eren and Amoyaw-Gyamfi were arrested by armed police while riding a motorbike in north London in October and found to be carrying Skorpion sub-machine guns and Tokarev handguns.
The court heard they were intercepted en route to "kill, or maim or wound" an unnamed person.
There were police officers inside the courtroom at Wood Green Crown Court and others inside and outside the building as they were sent to prison.
Jailing the men, who have a string of prior drug offences, Judge Nicholas Browne QC said: "In sentencing you I completely ignore and put out of my mind the serious incident outside the court area, not far from where I am today.
"I observe and agree with your wish to be sentenced today."