Four children threatened with counter-extremism referrals for wearing Palestinian flags or colours to school will receive tens of thousands of pounds in compensation from Lion Academy Trust, which has formally apologised to their families.

The children, all British Muslims aged between six and 10 at the time, attended a Children in Need non-uniform fundraising day at Barclay Primary School in Leyton, east London, in November 2023. Letters sent to their parents warned that they might be referred to Prevent, the counter-extremism programme, or local hate crime teams.

One child wore a Pudsey sticker with a bow tie in Palestinian colours; another had a homemade Palestinian flag badge. The children were remembering those killed in Gaza and expressing solidarity with children still suffering during the conflict.

At Central London county court on Thursday, a hearing was told that the trust had made a formal apology and would pay substantial compensation. The settlement ends a legal battle described by the families as lasting almost three years.

Their lawyers alleged direct and indirect discrimination and harassment on grounds including race, ethnicity, religion and belief, alongside breaches of rights to freedom of expression and freedom of thought, conscience and belief. The challenge concerned both the treatment of the children and their ability to express solidarity through what they wore.

Shahid Achhala said his son, then eight, had been expressing compassion for children in Gaza, including members of his extended family. He alleged that the school’s treatment had caused considerable emotional distress.

“What happened to our son was deeply disturbing and should never have happened to any child,” he said.

The families said they brought proceedings after repeatedly seeking an apology. They were represented by Leigh Day and supported by Prevent Watch, which provides casework assistance to people affected by the Prevent duty.

Layla Aitlhadj, a Prevent Watch director, said parents had been told their concerns were “false and malicious”. She described the settlement as vindication for the families and their supporters. Beyond its formal apology, no response from the trust is available.

Achhala welcomed the apology but said it could not erase the distress caused to his family or the delay in resolving the dispute.