A union boss has gone on trial for the alleged assault of two police officers who complained his chanting through a megaphone in support of gig workers’ rights hurt their ears.

James Farrar, a former Uber driver and the chair of the private hire branch of the Independent Workers Union of Great Britain, was leading a protest on 4 March last year in Parliament Square, London, when Sgt James Lewis and PC Ann Spinks were subjected to “battery” by the sound of his amplified voice, a jury at Southwark crown court heard.

Farrar was using the loud-hailer at a protest against a decision to levy the congestion charge on minicab drivers and not black-cab drivers. Black-cab drivers were also protesting at the same time on Parliament Square.

Farrar claimed he was only arrested and charged with the crime of assaulting an emergency worker a month later after he had made a formal complaint about the policing of the protest, the court heard.

The alleged assault occurred when police tried to clear protesting Uber drivers away from flatbed trucks they had brought in to remove their parked minicabs. Farrar had wanted his members to be able to drive on to the square and complained to police that they were being treated differently to black-cab drivers, who were also protesting that day. He said it was because “the demonstrators came from black and minority ethnic backgrounds”, Terence Woods, prosecuting, told the jury. “Black-cab drivers are predominately white British.”

Woods told the jury that amid “pushing and shoving” between police officers and protesters Farrar had used the megaphone close to the left ears of both Spinks and Lewis in a way that was “reckless” and “caused them injury albeit slight and transitory”.

He said the loud noise had exacerbated an ear infection Lewis was suffering from and Spinks said “there was disruption to her hearing”. He conceded the jurors might be surprised to hear the problems “cleared up after a short period of time” given the allegation Farrar had committed an assault.

“They weren’t beaten but the prosecution says the defendant was reckless in his use of the loud-hailer so close to the head and left ears of both of the police officers,” Woods said.

The jury also heard that minicab drivers were using whistles, air horns and vuvuzelas and the protest was as a loud as a rock concert or Premier League football match.

Woods said Farrar had not been arrested on the day of the protest “because it might have exacerbated the situation”.

Icah Peart QC, defending, said Farrer was only called in for a police interview a month later and was charged by post on 25 July.

Asked if the charge was related to a formal complaint Farrar had made about the police handling of the protest, Insp Bruce Middlemiss, the police commander who had been liaising with Farrar to organise the demonstration, replied: “No”.

The trial continues.