Cologne’s police chief has denied accusations of racial profiling after the force tweeted they had detained hundreds of North African men to prevent a repeat of last year’s mass sex attack.

The men had gathered late on Saturday near Cologne’s main train station and in the Deutz district, across the Rhine river.

Police described them as being “Nafris” – a colloquial term for North Africans – which prompted furious online criticism as it suggested the men had been arrested on the basis of their appearance alone.

Police Chief Juergen Mathies said: "I reject this negative criticism. The clear aim was to prevent similar events to previous year."

He said that of 650 people detained for identity checks, almost all were from North African countries and claimed: "Their characteristics were such that potential crimes could indeed be expected".

The force had been instructed to intervene early to avoid a similar situation to last year where over 1,000 women in the city were mugged, harassed and sexual assaulted.

In the weeks following the attacks, the city’s then police chief Wolfgang Albers was suspended from his post after the force was accused of initially trying to downplay the attacks.

Germany reacts to Cologne New Year's Eve attacks Show all 13 1 /13 Germany reacts to Cologne New Year's Eve attacks Germany reacts to Cologne New Year's Eve attacks Women protest against sexism outside Cologne Cathedral on 5 January after the assaults Oliver Berg/EPA Germany reacts to Cologne New Year's Eve attacks Women protest against sexism in Cologne following the rash of sex attacks on New Year's Eve Wolfgang Rattay/Reuters Germany reacts to Cologne New Year's Eve attacks Police initially failed to mention the assaults in report the following morning EPA Germany reacts to Cologne New Year's Eve attacks Police officers patrol in front of the main station of Cologne, Germany AP Germany reacts to Cologne New Year's Eve attacks German far-right supporters demonstrate at Cologne`s train station (Reuters) Reuters Germany reacts to Cologne New Year's Eve attacks Supporters of anti-immigration right-wing movement Pegida in Cologne, Germany, January 9, 2016. Reuters Germany reacts to Cologne New Year's Eve attacks Police used pepper spray to control supporters of Pegida, Hogesa (Hooligans against Salafists) and other right-wing populist groups as they protested against the New Year's Eve sex attacks on 9 January, 2016 in Cologne, Germany Reuters Germany reacts to Cologne New Year's Eve attacks Police use a water cannon during a protest march by supporters of anti-immigration right-wing movement Pegida in Cologne, Germany, January 9, 2016 Reuters Germany reacts to Cologne New Year's Eve attacks Police use pepper spray against supporters of anti-immigration right-wing movement Pegida, in Cologne, Germany, January 9, 2016. Reuters Germany reacts to Cologne New Year's Eve attacks Artist Mira Moiré protests naked in Cologne against the mass sex attacks on New Year's Eve AP Germany reacts to Cologne New Year's Eve attacks A demonstrator holds a sign in German that reads 'No violence against women' during a demonstration in the wake of the sexual assaults on New Year's Eve, outside the cathedeal in Cologne, Germany, 09 January 2016. EPA Germany reacts to Cologne New Year's Eve attacks Counter demonstrators hold up a sign reading "Against sexism, against racism" as they protest against a demonstration of the islamophobic movement PEGIDA at the train station in Cologne, Germany, on January 9, 2016. AFP/Getty Images Germany reacts to Cologne New Year's Eve attacks Demonstration by a women’s group on Saturday (AP) AP

The attacks provoked a furious backlash against German Chancellor Angela Merkel’s open door policy towards refugees fleeing Iraq and Syria who made the perilous journey across the Mediterranean sea or crossed into Europe through Turkey.

Many blamed refugees for the attacks – even though subsequent reports revealed only three out of the 58 men arrested were from Iraq and Syria.

The vote for anti-immigration party Alternative for Germany (AfD), whose leader Frauke Petry suggested police should be able to shoot refugees to prevent illegal border crossings, surged in several local and regional elections meaning they entered government in several areas – including Berlin – for the first time.

Around 100 people were arrested in Cologne overnight Saturday but it is unclear as to whether any of the 650 men detained were among them.

Meanwhile authorities logged around 160 crimes that included almost a dozen assaults or insults of a sexual nature.

Cologne Mayor Henriette Reker said she was "happy and relieved" that the night had passed fairly uneventfully. About 50,000 people rang in the new year in front of Cologne Cathedral, officials said.