Six people have been detained in Germany after police foiled an alleged knife attack at a half marathon in Berlin.

Police arrested the men, who are aged between eighteen and twenty-one, after carrying out searches in the area.

One of the apartments Berlin police raided before the race, was also searched after the Christmas market attack in 2016, according to a German newspaper Die Welt.

It's believed that the main suspect has connections with Anis Amri, the Tunisian who killed 12 people and injured 56 others when he drove a truck he hijacked into the crowded market in the city.

The suspect had in his possession two knives which had been sharpened.

A record of 36,000 athletes entered the half marathon with thousands of people lining the streets, which ended with no reported incidents.