An Austrian court has ruled that a German tourist who took exception to a World War II portrait in an Austrian guesthouse had no right to complain about it on travel sites.

The tourist posted comments on and Tripadvisor saying there had been "a photo of a Nazi grandpa hanging in the hall".

The picture was of a soldier in Wehrmacht uniform wearing insignia with a swastika.

The posts "gave millions of people the impression that my client sympathises with National Socialism", said lawyer Stefan Kofler, adding this had harmed the hotel owner's reputation.

The owner obtained an injunction from a court in Innsbruck ordering the hotel guest to remove the online comments. The tourist has said he will fight the ruling.

The guesthouse owner, in her filing, had argued that it was customary for people in the Tyrol region to hang pictures of dead family members in the entrance halls of their homes.

The portrait was of a family member who had been "forced to enlist" and killed in the war, she said.

After its annexation by Germany in 1938, Austria became closely associated with Hitler's Third Reich.

In 1947, however, it passed strict legislation against Nazi revisionism, negationism and neo-Nazi activities.