BERLIN (Reuters) - A 21-year-old German man shot at a refugee shelter with an air rifle from the window of his third-floor apartment in the northwestern German town of Lingen on Sunday, wounding two migrants, police said on Monday.

A 5-year-old girl from Macedonia and an 18-year-old Syrian suffered wounds in their legs and received hospital treatment, police said.

Police, who searched the suspect’s home, said it was not clear if the shooting was politically motivated but an investigation was underway.

More than one million migrants arrived in Germany last year and the mood towards them has gradually soured, boosting support for the anti-immigrant Alternative for Germany (AfD) party.

Police said the man was not arrested but he was being investigated for grievous bodily harm.