BORNHEIM, Germany — A western German town has barred adult male asylum seekers from its public indoor swimming pool after receiving complaints that some women were sexually harassed there.

It was the latest sign of social tensions related to the arrival last year of 1.1 million migrants in Germany, and followed reports of sexual assaults on women by young foreigners during New Year’s Eve celebrations in Cologne.

The deputy mayor of Bornheim, a town of 48,000 about 18 miles south of Cologne, said Friday that a difficult decision was taken to send a clear message that breaching German cultural norms was a red line that should not be crossed.

“There have been complaints of sexual harassment and chatting-up going on in this swimming pool by groups of young men,” said the deputy mayor, Markus Schnapka, “and this has prompted some women to leave.”