A special police task force detained three people in a refugee centre in southern Germany on Monday after hearing what appeared to be gunshots.
It remains unclear where the gunshot noises came from or who may have fired them, a police spokesman said.
The emergency call was received by the police around midday (1000 GMT). Officers surrounded the centre in the town of Uffenheim in northern Bavaria, and cordoned off a large area.
The police spokesman said that special forces also heard gunshot noises coming from the building.
One person initially left the building and was arrested without resistance, police said, while two more were detained in the attic.
In the afternoon, police gave the all-clear on the social media platform X. “There are no casualties. There is no danger,” the post said.
The police said emergency services would search the building for a weapon.