Scotland Yard has been forced to pay a total of more than £700,000 in compensation to 153 anti-fascist campaigners who were arrested by police during a demonstration and detained for up to 14 hours.

The campaigners had been detained while protesting against another demonstration led by the far-right activist Tommy Robinson.

The Met has paid the compensation, totalling £729,000, in out-of-court settlements after the campaigners took legal action alleging their detention was unlawful. The legal claims of another 28 campaigners have yet to be resolved.

Internal police documents seen by the Guardian show that two undercover officers spied on anti-fascist campaigners at the demonstration.

The pair infiltrated a group detained by the police, who pretended to arrest the covert officers so they could then disappear, according to the documents.

Kevin Blowe, the coordinator of the civil liberties group The Network for Police Monitoring, said the payouts were huge. He criticised the deployment of the undercover officers, saying: “Their role was surveillance on a new and emerging anti-fascist movement – its size, structures, allies and prominent members.”

The Met confirmed the compensation payments, adding it had settled the claims without admitting liability. The force has been required to pay for the legal costs of the campaigners.

The payouts – which average nearly £5,000 each – come after years of legal action by the campaigners, who had protested against a march organised by the English Defence League (EDL) on 7 September 2013.

Tommy Robinson and the far right’s new playbook Read more

The EDL – led by Robinson, whose real name is Stephen Yaxley-Lennon – had intended to march to a mosque in Tower Hamlets, east London. The anti-fascist campaigners opposed the march, arguing that Robinson and his supporters were deliberately seeking to provoke hate crimes in an area with a large Asian and Muslim population. EDL said it was its democratic right to march in the borough.

Police had imposed restrictions about when and where both demonstrations could take place. The anti-fascist campaigners gathered in a counter demonstration at a Whitechapel park to hear speeches and then set off on their march.

At lunchtime, police surrounded and detained two groups of anti-fascist campaigners in a containment tactic known as “kettling”. This, police said, was done in order to “prevent an imminent breach of the peace”.

The campaigners said they were humiliated as they were prevented from using the toilet for hours and were not allowed to get food or water. Later they were taken to police stations around London and released, some of them in the middle of the night.

Police arrested 286 protesters under public order legislation, saying the demonstrators had broken the conditions imposed on the protest. The campaigners said they had been unaware of the restrictions on the protest. Only one person was subsequently prosecuted, according to sources with knowledge of the case.

The internal police documents show that the two undercover officers, who are not identified, infiltrated the group of campaigners who were being held near Commercial Road. During the afternoon, the pair were “arrested” in a ploy and then released when they were out of the sight of the group, with senior officers noting that the “extraction was achieved without incident”.

It is the most recent use of covert officers to spy on political campaigners that has been documented.

The force declined to explain the justification for the deployment of the officers. It said :“The Met will neither confirm nor deny the deployment of undercover officers during any specific event or operation. The covert nature of undercover policing is central to its effectiveness.”

A public inquiry led by the retired judge Sir John Mitting is examining how undercover officers have gathered information on more than 1,000 political groups since 1968. The groups include anti-racist campaigners, environmentalists, leftwing groups and the far right.