Police in the German capital have shot dead a man who attacked another resident with a knife in a refugee shelter.

German news agency dpa reports that the 29-year-old man was angry at a younger man who he believed had abused his daughter.

Dpa reported that the attack happened late Tuesday as police were arresting the 27-year-old alleged abuser in the refugee shelter in the center of Berlin.

The head of the German Police Union, Bodo Pfalzgraf, said Wednesday that the incident was "tragic" but urged the media not to jump to conclusions about the police officers' actions.

Pfalzgraf said officers were bound to "prevent vigilantism and a situation that threatens their own lives."