Police in Germany's southern state of Bavaria are investigating two officers suspected of performing the illegal Hitler salute.

The German constitution makes it a crime to exhibit Nazi symbols and the incident is likely to feed into a heated debate about racism and the rise of the far right after a record influx of mainly Muslim migrants three years ago.

Police said in a statement on Saturday the two policemen had shouted anti-immigrant remarks and made the salute in a pub in the city of Rosenheim on Thursday. It based its information on a witness who was in the same beer garden as the two officers.