On Sunday police confirmed that the man, identified as Dirk P., had been killed.
Neighbours called his mother on Saturday afternoon after they heard him screaming and smashing furniture in his apartment in the Ohlsdorf district of Hamburg. His mother called the police after she was unable to calm him.
The police first attempted to enter using his mother's key, but finding the door barricaded, the officers broke it down and entered. According to police spokeswoman Ulrike Sweden, they were then attacked by the knife-wielding man in the hallway.
When the use of pepper-spray failed to stop him, one of the officers drew his gun and shot Dirk P. three times, hitting him twice in the upper body and once in the arm. Although an ambulance was already on hand, emergency workers were unable to save his life.
According to a report in the Hamburger Morgenpost newspaper, Dirk P.'s mental illness was well-known. He had been undergoing treatment for several years and had a guardian.
The police have claimed that he was shot in self-defence, but a murder inquiry has been opened to clarify why the officers did not retreat once the pepper-spray had proven ineffective or attempt to disarm him another way.