Berlin (AFP) - A town in Germany has banned male asylum seekers from public swimming pools after complaints from women that they were being harassed by migrants, AFP learnt Friday.

A spokesman for the local government of Bornheim said the ban on male asylum seekers above the age of 18 came after six people filed complaints "over the sexually offensive behaviour of some migrant men at the pool".

The measure aimed at "making it clear to the men that the right of women in Germany is inviolable", he added.

Officials have gone personally to three asylum seeker shelters near the pools to deliver news of the ban and emphasise how people should behave in swimming pools, said the spokesman.

The western German town would revoke the ban once it deems that the message has been drilled into the asylum seekers, he said, adding that this would be evaluated through interviews with social workers at the shelters.

Authorities denied placing entire groups of people under suspicion, but said the measure was aimed at laying down clear ground rules.

Public distrust of asylum seekers has grown in Germany after it emerged that hundreds of women were groped and robbed in a throng of mostly Arab and North African men during New Year's festivities in Cologne.

An opinion poll for public television ARD found that 48 percent of respondents said they were afraid of refugees, while 50 percent said they did not feel that way.

A separate poll for public broadcaster ZDF also found that seven in 10 people fear that a record influx of asylum seekers will lead to more crime, compared to 62 percent in October.

Germany took in 1.1 million asylum seekers in 2015, mostly from Syria, Afghanistan and Iraq.