Police shot and wounded a man brandishing a knife inside Berlin's main cathedral on Sunday but said there was no indication the assailant had a "terrorist" motive.
The man with the knife, a 53-year-old Austrian, was "yelling and causing damage" before being shot in the leg shortly after 4pm (local time), police said in a statement.
When the incident began, about 100 people were evacuated from the landmark Berlin Cathedral in the heart of the German capital.
When officers arrived they urged the man to put down the knife and tried to neutralise him with irritant gas, to no success, police said.
Finally, they faced the assailant near the altar of the cathedral, and "the man was wounded in the leg by a shot from a policeman", a spokesman said.
The man was hospitalised and underwent surgery, the spokesman added.
A policeman was also slightly injured by a ricocheting bullet from another officer, but was able to leave the hospital in the evening.
Witnesses told local media that the man appeared "very confused".
"Based on what we know so far, we have no information that the suspect in any way had a terrorist or Islamist motive," a police spokesman said.
The iron-domed Protestant cathedral, one of the city's top tourist attractions, is on Museum Island off east Berlin's main Unter den Linden boulevard and close to the Alexanderplatz shopping district.
An AFP reporter said the entrances to the church were blocked off with red-and-white police tape and several officers with automatic weapons were patrolling the scene.
DPA news agency said some witnesses were taken away to receive psychological counselling.
The shooting comes with authorities in a state of high alert for extremist attacks after several assaults claimed by ISIS in the country.
Read more: Major ISIS propaganda sites taken down
Like other European nations, Germany remains a target for Islamist militant groups, in particular because of its involvement in the coalition fighting ISIS in Iraq and Syria, and its deployment in Afghanistan since 2001.
In the worst attack in the country to date, Tunisian asylum seeker Anis Amri rammed a truck into crowds at a Berlin Christmas market in December 2016, killing 12.
The assault occurred in the shadow of the Kaiser Wilhelm Memorial Church, a war-damaged landmark in the west of the capital.
A court in March sentenced a 26-year-old Palestinian asylum seeker to life in prison for killing one and wounding six others with a knife in a Hamburg supermarket out of a "jihadist" motive last July.
In April, Berlin police briefly detained six men amid fears of an attack on the city's half marathon, which drew 36,000 runners.
But they were released when searches of their homes and vehicles netted no weapons, explosives or other evidence.
The same weekend, a German driver in the western city of Muenster ploughed a van into an open-air restaurant, killing two people.
The driver later shot himself and investigators cited mental health problems, not a political motive, as being behind the attack.
Germany's security services estimate there are around 10,000 Islamist radicals in Germany, some 1,600 of whom are suspected of being potentially violent.
Political opponents of Chancellor Angela Merkel, including the far-right AfD party, have charged that the security situation has worsened with the arrival of more than one million migrants and refugees since 2015, many from African and Middle Eastern conflict hotspots.