Three teenagers who tried shooting a gang rival dead − narrowly missing three children − have been handed lengthy jail sentences.

Shocking CCTV footage shows 19-year-old Kabir Khan open fire with a handgun through the door of Classic Fish Bar in Birmingham on Saturday 7 October 2017 sending customers diving for cover.

Khan, his brother Sajeer Khan aged 18 and getaway driver Atif Imran also 18 pursued their intended target along St Margaret’s Avenue at 9pm before he ducked into the chip shop for cover.

Brandishing a .41 Colt revolver, Khan discharged one bullet that flew through the shop and lodged in a sign behind the serving counter.

A six-year-old boy and two other children aged eight and 12 were waiting in the fast food outlet and police later said it was “a miracle" no-one was killed or seriously hurt.

West Midlands Police appealed for information on the shooting and community intelligence pointed to the Khans as potential suspects.

Detectives located the trio’s getaway car − a Ford Focus bought on 28 September from an auction − abandoned the day after the shooting in Sandbourne Road, Alum Rock.

And clothing believed to have been worn by the shooter was found dumped under bushes in Kents Moat Recreational Ground; forensic tests revealed Kabir Khan’s DNA on clothing items and his fingerprints on the bag.

Kabir Khan fled to London following the shooting but West Midlands Police tracked him down to an address in Ilford, Essex, on 28 October where he was arrested.

A laptop computer seized from the flat was examined and revealed internet searches relating to firearms and ammunition, while his mobile phone had been used to find news coverage of the fish bar attack.

Sajeer Khan was arrested from a flat in Berryfields Road, Sutton Coldfield, on 5 January while Atif Imran − who flew to Pakistan seven days after the shooting − was detained at Birmingham Airport on 23 January as he tried returning to the UK.

Examination of their mobile phones showed extensive communication between the three before, during and after the offence and revealed they were in the location of St Margaret’s Avenue at the time.

Body-mapping experts also assessed CCTV images of the shooter and his associate and concluded similarities between the offenders and the Khans.

Imran, from Sladefield Road in Alum Rock, admitted possessing a firearm with intent to endanger life but the Khans denied involvement − but were found guilty at Birmingham Crown Court and sentenced today.

Kabir Khan, of Orpwood Road, Lea Hall, was jailed for 19 years, Atif Imran was handed 17 years and Sajeer Khan, of Fernbank Road, Alum Rock, was handed 10 years and two months.

Investigating officer, Detective Constable Dan Halford from West Midlands Police’s Force Priorities Team, said: “This was a hugely reckless discharge of a firearm in public − and one which could have resulted in the serious injury or death of completely innocent people.

“One witness in the chippy described the terror and panic as someone shouted ‘he’s got a gun’ then heard a loud bang and glass shattering.

“We know there were around 10 people in the chip shop when the offender opened fire; it’s miraculous that none of them, including children, were hit by the bullet or flying glass.

“This was undoubtedly a targeted attack: they were chasing another teenager it’s understood they were in dispute with. It’s shocking they thought it was acceptable to resolve that dispute by discharging a handgun in a busy take-away."

Kabir Khan has 12 previous convictions for 20 offences, including robbery, assault and car theft, dating back to June 2011 when he was just 12-years-old.

The Khans, Imran and 17-year-old Ibrahim Mohammed were also convicted of a carjacking in Garretts Green Lane, Sheldon, a day before the shooting when a 60-year-old man was ambushed on his driveway and had his BMW 420 stolen.

The man was threatened with a baseball bat and machete before being punched to the floor and run over by the Ford Focus that was then used in the shooting; he spent six days in hospital recovering from his injuries.

A Tesco Clubcard belonging to the victim was found in the Focus’ centre console when it was recovered − and the 17-year-old student was caught on CCTV using the victim’s bank cards to try and purchase bottles of vodka at an Alum Rock shop on 7 October.

Mohammed, of Banford Road, Alum Rock, was handed a sentence of four years and six months.