Five men and a teenage boy were today given lengthy jail terms for a "concerted attack on the police" in which officers and a force helicopter were shot at during last summer's riots.
A judge said it was only luck that nobody was struck by bullets in the disorder and described the potential consequences of the police helicopter being brought down by gunfire as "catastrophic".
Police said they could have been dealing with a murder inquiry.
Jermaine Lewis, 27, Nicholas Francis, 26, Wayne Collins, 25, and Renardo Farrell and Tyrone Laidley, both 20, were part of a gang that petrol bombed a Birmingham pub in a ploy to lure police to the scene. All five were convicted of possession of a firearm with intent to endanger life, reckless arson and riot. Amirul Rehman, 17, was convicted of riot and possession of a firearm. A six-week trial heard that the defendants were part of a group of 41 men - mostly masked and wearing hoods - who were rioting outside The Bartons Arms in Aston on the evening of August 9.
The landmark pub was broken into, ransacked and set ablaze, while four members of staff were in living quarters upstairs.
A specialist police unit of around 30 unarmed officers deployed to the scene was pelted with missiles before at least 12 shots were fired.
Dramatic CCTV footage released by police shows a large group of men - some armed with baseball bats - gathered outside the pub throwing things into the road, and smashing windows. One man - said by the prosecution to be Laidley - can be seen taking aim at the police helicopter with a handgun.
Police said the helicopter, which was sent to film the disorder and support officers on the ground, appeared to be shot at twice.
Sentencing at Birmingham Crown Court, Judge William Davis QC said: "Members of the group attacked the building. They smashed windows, they went inside and ransacked the premises. They threw chairs and tables out on to the pavement.
"Other members of the group stayed on the pavement outside the building. Some threw missiles, bottles and the like, at a passing police car.
"Others lit petrol bombs that had been brought to the scene.
"The purpose of all this was not to loot or to steal. Nor was it mindless vandalism. The purpose, the common purpose, was to behave in such a way that the police would come to the scene and then to attack the police."
He added: "The intention was to endanger life. Although no physical injury was suffered, that was wholly a matter of luck. Had the police helicopter been struck, the consequences could have been catastrophic.
"There may have been no physical injury to a police officer, but the damage to the wellbeing of the city of Birmingham caused by an armed gang prepared to act in this way was grave.
"It is very difficult to conceive a case of this type more serious than this one."
Francis, from Great Barr, Birmingham, was described by the judge as "clearly a dangerous man" and jailed for 30 years.
Lewis of Summerton Road, Oldbury, West Midlands, and Laidley of Nechells, Birmingham, were each sentenced to 23 years. Farrell, of Finchfield, Wolverhampton and Collins, of Ouseley Close, Luton, Bedfordshire, were both jailed for 18 years. Rehman was jailed for 12 years.
The judge said the five defendants who were convicted of arson were "completely indifferent" to the risk to the staff still in the building.
He said: "All they were interested in was luring the police to the area.
"The fact that members of staff looking on helplessly upstairs were put in real fear and no little danger meant nothing to them."
West Midlands Police Assistant Chief Constable Gareth Cann said the defendants displayed "an extraordinary degree of criminality and malice towards officers", adding that he was "very pleased" with the sentences.
""This could easily have been a murder inquiry. Officers came close to being shot and, in a worst-case scenario, the helicopter could have been brought down.
"Thankfully officers were not injured but we can't underestimate the impact it's had on those involved.
"We would like to pay tribute to those operational support officers deployed on that night who were faced with armed offenders, as well as the crew in the force's helicopter who obtained vital footage for the investigation."