A man described as having a “strong historical extremist pedigree” has said he had limited contact with the ringleader of the London Bridge terror attackers, despite owning both the gym and school where he worked and the existence of hundreds of text messages between the pair’s phones.

Sajeel Shahid, who has repeatedly refused to be questioned by police about the attacks, set up Ummah Fitness Centre (UFC) and Ad-Deen primary school, both in Ilford, east London.

Khuram Butt, who with Rachid Redouane and Youseff Zaghba killed eight people on the night of 3 June 2017, worked at both locations. Redouane also worked at the gym and Zaghba worked at the school.

All three men also trained at UFC, where it is suggested they may have planned and prepared the attack.

Shahid’s links with the trio have come under scrutiny during the inquest at the Old Bailey into the eight victims because of his past membership of the extremist group al-Muhajiroun (ALM), with an MI5 boss describing him as having a “strong historical extremist pedigree”.

Additionally, in the 2007 “fertiliser” trial of men accused of plotting to blow up Bluewater shopping centre and the Ministry of Sound nightclub, Mohammed Junaid Babar, a US terrorist turned FBI supergrass, accused Shahid of setting up the Malakand camp in Pakistan, where the 7 July bomber Mohammad Sidique Khan is said to have trained.

But Shahid, 43, said he left ALM after the 9/11 attacks in 2001 – before Butt joined – and denounced Babar and the media for spreading lies about him.

He told the inquest on Monday that the reason he refused to speak to police in the aftermath of the attack was because he was not involved and feared further vilification from the media.

Shahid said he exchanged few words with Butt when the latter was working on the reception at the gym and had no social contact with him.

“How am I supposed to know what he is thinking, what he is planning, what was in his mind?” said Shahid, whose identity was hidden during his evidence. “If I ever knew he was capable of anything like this, I would have reported him to police and had him arrested.”

The court heard that in December 2016, January 2017 and May 2017 (Shahid was in the Netherlands in the interim months) there were 77 calls, 39 connected, between a number registered to Shahid and Butt’s phone. There were also 329 text messages between the numbers.

Shahid said he could not remember what the communications were about but suggested it was probably “gym things”, adding that his ex-partner sometimes used his phone as well.

After Shahid confirmed he had the phone in question in court and, subject to his lawyer’s assent, would be willing to show it to police, Jonathan Hough QC, counsel to the inquest, told him: “I understand that police will be asking to look at your phone before you leave court.”

Asked if he would comply and not delete any material from his phone beforehand, Shahid agreed.

He told the court: “I have never been arrested or charged or questioned by police or MI5. I am 43 years old. If I was such a horrible person as the media makes out, that would have happened … I am a law-obeying citizen.”

The inquest is due to conclude this week.