Bomb disposal experts were called out to a refugee shelter in south-western Germany in the early hours of Friday after thugs hurled a hand grenade onto the grounds of the building.
The device did not explode although the pin had been removed, sources said. No one was injured in the attack on the housing facility for new arrivals in the town of Villingen-Schwenningen on the edge of the Black Forest.
A security official at the accommodation noticed the grenade at 1:30 am (0030 GMT) and alerted the emergency services. Police cordoned off streets surrounding the building before experts conducted a controlled explosion.
Investigators said they were looking into whether the grenade contained a fuse and therefore could have detonated.
"It is clear that it was filled with explosives," said Johannes-Georg Roth, chief state prosecutor in the nearby city of Konstanz. "We do not know whether it had a detonator. That is a deciding factor [in the investigation]."
The Federal Criminal Office (BKA) said that this was the first case of explosives being used to attack a refugee shelter.
"Until now, we had several cases in which fireworks were used," a BKA spokeswoman said. "Using a military weapon against a refugee shelter in new."
The spokeswoman, however, urged caution in drawing rash conclusions on the grenade attack.
Housing for asylum seekers has frequently been the target of arson and hate crime in Germany in recent months, as right-wing extremists lash out at Chancellor Angela Merkel's decision to allow 1.1 million refugees and migrants into the country last year.