Tommy Robinson did not believe he was breaching reporting restrictions when he broadcast footage on social media of defendants in a criminal trial while jurors were considering their verdict, high-court judges have heard.

The former English Defence League (EDL) leader, whose real name is Stephen Yaxley-Lennon, is said to have committed contempt of court by filming defendants accused of the sexual exploitation of young girls and livestreaming the footage, in breach of a reporting ban.

A reporting restriction was put in place which postponed the publication of any details of the case until the end of a series of linked trials involving 29 defendants, to try to ensure all defendants received a fair trial.

Robinson broadcast the footage from outside Leeds crown court on 25 May last year, while the jury in the second trial was considering its verdict.

He was asked questions about “inconsistencies” in different versions of events he has given by lawyers for the attorney general, Geoffrey Cox QC, whose application to have Robinson committed to prison is being heard at the Old Bailey.

Robinson, during cross-examination by Andrew Caldecott QC for the attorney general, told the court he “erred on the side of caution” when he spoke about the trial in his livestreamed video.

He said he knew there was a reporting restriction in place and made checks at court on the day of the broadcast, to find out if the restriction had been lifted.

But he said he believed it “didn’t matter” as long as he did not give details of the case and only discussed information which had been published about earlier hearings, before the reporting ban was in place.

He told the court: “I didn’t talk about the first trial, I didn’t talk about details. I didn’t report on the proceedings, I simply reported public information.”

Caldecott asked Robinson if he remembered being directed to the court’s general office by a security officer to check if the reporting restriction was still in place, to which Robinson replied he could not remember.

The barrister said: “I’m suggesting to you that the reason you didn’t go to the office … was because you wanted to film the defendants who you knew tended to arrive early at court.”

Robinson replied: “I took the view that it didn’t matter, if I wasn’t going to report on the details of the case, and that if I was only going to stick to details in the public domain, it didn’t matter.”

He told the court he believed images of defendants accused of such serious crimes should be made public.

He added: “My total purpose is to raise awareness of these issues.”

When asked why he didn’t mention making the checks on the reporting restriction in a witness statement before his appeal hearing in 2018, he said he was in prison at that time and had “given up” because he did not believe he would be released.

He added: “I believed I would be killed in prison, I didn’t think I was going to be released.”

Robinson also told the court he had received training in media law after making previous mistakes in reporting. He said the “main thing” he took from his training was not to assume guilt, and said he made that point “so clear” in his broadcast.

Caldecott previously told the court Robinson knew there was an order in place and his broadcast was therefore “subjectively reckless”.

The court also heard that, due to an “administrative error” on the day Robinson made the recording, the reporting restriction did not appear on the Leeds crown court list and a copy of it was not posted on the door of the courtroom.

Robinson, 36, from Luton, Bedfordshire, was jailed for 13 months in May 2018 after being found in contempt of court in relation to the broadcast. He served two months in jail before being freed after that finding of contempt was overturned by the court of appeal in August 2018.

The case was then referred back to the attorney general who announced in March it was in the public interest to bring fresh proceedings against Robinson.

The high-court judges Dame Victoria Sharp and Mr Justice Warby gave permission for the attorney general to bring fresh proceedings against Robinson at a hearing in May.

He could be sent back to jail if he is again found in contempt, an offence which carries a maximum sentence of two years.

In the video – which lasted 90 minutes and was viewed online 250,000 times after being livestreamed on Facebook – Robinson discussed a trial of members of a Huddersfield grooming gang.

The contempt hearing will continue on Friday.