"There is currently no evidence of a terrorist or Islamist motive."
The incident took place at Berlin's Protestant cathedral on Museum Island, one of the city's best-known landmarks that draws thousands of tourists.
According to local press reports cathedral staff called the police shortly after 4pm local time because a man was running through the cathedral, waving a knife and being "verbally aggressive", and causing widespread panic among visitors.
Police cleared the cathedral and initially attempted to calm the man. When that failed, one of the officers shot him in the legs to incapacitate him.
His injuries are not believed to be life-threatening. He was being held under arrest and treated in hospital.
A police officer was also injured by his colleague's fire and was being treated in hospital.
At the time of the shooting other visitors had already been evacuated from the cathedral, but several had to be treated for shock.
The cathedral was sealed off and planned evening services were cancelled.
The incident came exactly one year after the London Bridge terror attack, as a memorial service was held in Southwark Cathedral.