Police suspect that a fire that broke out at a hotel housing Ukrainian refugees in northeastern Germany is a case of politically motivated arson.

Fourteen guests, most of them Ukrainians, and three staff were in the half-timbered thatch-roofed Hotel Schaefereck when the fire began on Wednesday evening, police in Rostock said on Thursday, adding that none of them was hurt.

"As things stand, arson is suspected and a political motivation is assumed," the police said in a statement.

The blaze erupted at 9:20 p.m. in the hotel near the Baltic seashore in the village of Gross Stroemkendorf, which since April served as accommodation for Ukrainians fleeing the Russian invasion of their country.

"People who sought refuge from (Russian President Vladimir) Putin's war had to be rescued from the flames," Interior Minister Nancy Faeser said.

"If arson is confirmed, then this is a hate crime that will be prosecuted with all vigour."

Prosecutors have ordered specialist fire investigator to look into the cause of the blaze, police said, adding that they were now assessing the damage to the building.

"I was deeply shocked by what happened here," said lead police inspector Michael Peters. "Any attack on refugees or their accommodation is an attack on our values. Such an attack is shocking and unacceptable."

The blaze, in the sparsely populated, poor eastern state of Mecklenburg-Vorpommern, took place near where, in August 1992, hundreds of far-right radicals rioted against asylum seekers for two days, throwing petrol bombs at their encampments, in post-war Germany's worst anti-immigrant mob attacks.

The events triggered copycat attacks all over Germany, including the burning down by neo-Nazis the following year of a Turkish family's house in Solingen. Five family members were killed and 14 injured. (Reporting by Thomas Escritt; Editing by Alison Williams)