The German authorities said that the rare decision was made after a previous explosion in a residential area of the city.