The ringleader of the London Bridge attack passed a background check to work on the Underground despite being reported to an anti-terrorist hotline, a member of a banned group, investigated by MI5 and appearing in a documentary on jihadis.

Khuram Butt was employed by Transport for London as a customer service assistant on a salary of £23,000 a year in the summer of 2016, inquests into the attack heard.

The Old Bailey was told that compulsory background checks did not flag up Butt’s appearance in a television documentary called the Jihadis Next Door, which aired months before.

Jonathan Hough QC, counsel for the inquests, asked whether Butt’s job “gave him access to a London Underground station in a security capacity”.

Acting Detective Chief Inspector Wayne Jolley, who investigated the attacker’s background, replied: “Yes, it did.”

London Bridge Terror Attack Show all 16 1 /16 London Bridge Terror Attack London Bridge Terror Attack Armed police on Borough High Street as police are dealing with a "major incident" at London Bridge PA London Bridge Terror Attack Armed Police talk to members of the public outside London Bridge Hospital as police are dealing with a "major incident" at London Bridge PA London Bridge Terror Attack Police Officers outside the Barrowboy and Banker Public House on Borough High Street as police are dealing with a "major incident" at London Bridge PA London Bridge Terror Attack Armed Police talk to members of the public outside London Bridge Hospital as police are dealing with a "major incident" at London Bridge PA London Bridge Terror Attack Armed police on Borough High Street as police deal with a 'major incident' at London Bridge PA London Bridge Terror Attack Emergency services near the scene of the incident Screengrab London Bridge Terror Attack People run down Borough High Street as police are dealing with a "major incident" at London Bridge Reuters London Bridge Terror Attack Emergency services arrive at the scene near Borough market at London Bridge Carl Court/Getty Images London Bridge Terror Attack Emergency personnel on London Bridge as police are dealing with a "major incident" at London Bridge PA London Bridge Terror Attack Police sniffer dogs on London Bridge as police are dealing with a "major incident" at London Bridge PA London Bridge Terror Attack A second helicopter lands on London Bridge as police are responding to three incidents in the capital, amid reports that a vehicle collided with pedestrians on London Bridge, Scotland Yard said. Officers are dealing with reports of stabbings in Borough Market, where armed officers attended and shots were fired. They are also at an incident in the Vauxhall area PA London Bridge Terror Attack Police attend to an incident on London Bridge in London REUTERS London Bridge Terror Attack Police attend to an incident on London Bridge in London, Britain Reuters London Bridge Terror Attack A police officer escorts members of the public to safety at London Bridge Getty Images London Bridge Terror Attack Police attend to an incident on London Bridge in London, Britain Reuters London Bridge Terror Attack Police attend to an incident near London Bridge in London, Britain Reuters

Butt had made no attempt to hide his identity while appearing alongside a group of known extremists from Anjem Choudary’s al-Muhajiroun Islamist group.

Described as Britain’s “most proliﬁc and dangerous extremist group”, supporters have carried out atrocities including 7/7 London bombings – which targeted the Tube and buses – and fought for Isis, al-Qaeda and the Taliban abroad.

The documentary showed Butt joining a public prayer towards a black flag associated with Isis, alongside a man who later joined the terrorist group in Syria.

An unaired clip, which was filmed in August 2015, was played to the court showing Butt ranting about British airstrikes.

The court heard that Butt’s relatives said he “brought shame on the family” in the programme and forced him to apologise.

Earlier the same year, relatives threatened to disown Butt and report him to the police over fears he wanted to travel to Syria.

In mid-2015, MI5 opened an investigation codenamed Operation Hawthorn over intelligence suggesting that Butt was planning a terror attack in the UK, putting him under surveillance.

Then in September 2015, Butt’s brother-in-law reported him to the anti-terrorist hotline after a debate over a gory Isis propaganda video showing a Jordanian pilot being burned to death in a cage.

Khuram Butt with members of al-Muhajiroun in a 2016 documentary (Channel 4)

Before joining London Underground, Butt had various jobs at a domestic refuge, Topshop, a pizza restaurant and at a removal company.

The court heard he persuaded his wife to give him money, made cash by obtaining mobile phones and selling them on Gumtree, and sought a handout from Transport for London’s staff welfare fund.

Butt took sick leave from the Tube after claiming that “company shoes were causing issues” and was sacked in October 2016.

The court heard that while claiming he was unable to work, Butt started training at the Ummah Fitness Centre in Ilford.

He got to know fellow attacker Rachid Redouane at the gym, which was run by a senior member of al-Muhajiroun linked to a network of safe houses for British jihadis and terror training camps in Pakistan.

Sajeel Shahid’s wife, Sophie Rahman, was the headteacher of an Islamic primary school in Ilford and asked Butt to give children Quran lessons 18 months before the London Bridge attack.

The court heard that fellow terrorist Youssef Zaghba also volunteered at Ad-Deen primary school, which was shut down in the wake of the atrocity.

The court heard that Butt had been a “party animal” who drank, smoked and used drugs, before showing signs of extremism in 2013.

Butt told a colleague the murder of Fusilier Lee Rigby – by two extremists who were also linked to al-Muhajiroun – was an “eye for an eye”.

Footage released of London Bridge victim who used skateboard to fight terrorist

The Independent previously reported how Butt was spotted alongside Choudary at a protest following Mr Rigby’s murder in 2013, where he called a counter-extremism campaigner an apostate.

The inquest heard that the would-be terrorist became “like a lion out of a cage” in Choudary’s company and had been “energised” by the hate preacher, who was jailed for inviting support for Isis but has since been freed.

Butt was also arrested numerous times, including on suspicion of fraud and for abusing a researcher from the Quilliam counter-extremism think-tank in 2016.

No charges were brought in either case, and following his death Butt was linked to another incident in April 2017.

A man reported losing an iPad, which was later found in Butt’s home, after a car he thought was a taxi drove away and broke his leg.

Butt had been born in Pakistan in 1990 and came to Britain on a visitor’s visa with his family at the age of eight, the court heard.

In 2004, following the death of his father from a heart attack, he was given indefinite leave to remain in the UK.

He went to schools in Forest Gate and Stratford in east London, gaining 11 GCSEs.

Butt married Zahrah Rehman ​in December 2013 and they went on to have two children, his daughter born just a month before the terror attack.

A friend told police that Butt liked playing football, supported Arsenal and had been into reggae music.

Butt wore an Arsenal shirt under a fake suicide vest during the London Bridge attack, when he Redouane and Zaghba ploughed a hired van into pedestrians before launching a stabbing rampage in Borough Market.

They killed eight victims and injured 48 more before being shot dead by armed police.

The inquest continues.