German authorities say a police cadet has been killed in the southern city of Wuerzburg after being apparently accidentally shot by a fellow trainee.

Police inspector Michael Zimmer told the dpa news agency Friday that the shooting occurred Thursday night when the two trainees were alone in their room in a police barracks before going on guard duty.

He said the younger of the two trainees, who were both about 20, appears to have accidentally discharged his weapon, mortally wounding his colleague.

Prosecutors were investigating the trainee on suspicion of negligent homicide.

Zimmer said the "central point" of the investigation is to determine "what circumstances led to this, according to current knowledge, unintentional shooting."