Police in Germany are believed to have prevented a suspected terror attack on the Berlin half-marathon on Sunday.

Six people were arrested in a series of operations around the city on suspicion of planning to attack spectators and runners at the event with knives, according to German press reports.

Police would only confirm that six people between the ages of 18 and 21 were arrested on suspicion of “planning a crime” in connection with the race, which attracted an estimated crowd of 32,000.

German media reported that the suspected ringleader is a known associate of Anis Amri, a Tunisian Isil adherent who killed 12 people when he drove a truck into a packed Christmas market in Berlin in 2016.

He had been under surveillance for some time and police decided to act when it became clear he and his associates were planning an attack, according to Welt newspaper.

“We’re still evaluating. But the signs are it was close,” the newspaper quoted an unnamed police officer as saying. Police had only been watching the main suspect for two weeks, according to some reports.