Police have arrested a number of men with Islamic fundamentalist links in connection with an alleged plot to attack the Berlin half-marathon, local media reports.

Six suspects between the ages of 18 and 21 were detained after police officers carried out searches of apartments and vehicles in the Charlottenburg and Neukölln districts of the German capital, following a tip-off from a foreign intelligence agency alerting authorities to a planned attack on the race.

The apparent failed attack comes just weeks after police in Italy detained and charged an illegal immigrant from Algeria with attempted terrorism after he tried to ram a stolen car into pedestrians in front of the Shrine of Pompeii Basilica.

Police named one of the Berlin suspects as 20-year-old Walid S., considered a “close confidant” of Berlin terrorist Anis Amri, the illegal immigrant from Tunisia who carried out Germany’s worst jihadist attack to date.

According to the Berlin Morgenpost the two men met for dinner in December 2016 at Breitscheidplatz where, later that day, Amri killed a dozen people and wounded many more when he ploughed a truck into a Christmas market on the public square.

Found with “specially sharpened knives” in his possession when intercepted by officers, Walid had planned to attack spectators and participants at Berlin’s half-marathon on Sunday, according to initial reports.

Germany: Rising Security Threat as Authorities Warn Islamic Extremists Have Doubled to 11,000 https://t.co/aAcrHWDr2L — Breitbart London (@BreitbartLondon) April 8, 2018

But police spokesman Thomas Neuendorf told AFP “at no time were [marathon] runners or spectators in danger”, insisting that surveillance of the detained men by a specialist task force would have allowed authorities quick access to prevent any attack they had planned.

Assessed as posing a danger to the public, Walid S. had reportedly been under surveillance for months as investigators believed the 20-year-old may have wanted to seek revenge for Amri’s death last year at the hands of Italian law enforcement.

Confirming only that the suspects “might have planned something during the half marathon”, Neuendorf added that authorities had seized “data storage devices, mobile phones, two vehicles and a small knife” during the raids.

Currently on a trip to Jordan where he plans to visit refugee camps, left-wing Berlin mayor Michael Müller thanked security forces in the city for preventing a “cowardly attack on the half-marathon” with their “prompt and successful intervention”.

Some 630 officers were deployed to guard the race on Sunday, which took place a day after two people were killed when a van was rammed into pedestrians in the town of Munster.