The Staatsanwaltschaft or public prosecutor's offices are criminal justice bodies attached to the judiciary but separate from the courts in Germany, Austria and the German-speaking parts of Switzerland. This kind of office also exists in China, Macao and Taiwan and in some countries in Central Europe including Slovakia and the Czech Republic.
In Germany, the police have an obligation to investigate every single crime reported and subsequently send all investigations to the Staatsanwaltschaft. The public prosecutor, the Staatsanwalt (State Attorney), reviews the findings of the police and decides whether to indict the accused or halt the proceedings.
The prosecutor’s office has (in theory) the duty to investigate and pursue any matter in its jurisdiction as soon as it learns that a criminal offence may have been committed (Legalitätsprinzip). However there are some offences which require the victim to explicitly request prosecution (Antragsdelikt), other cases may be dropped due to "small guilt" or "non-importance" or the complainant may be told to prosecute on his own (common in defamation cases unless a VIP is involved). Prosecutors are authorised to undertake investigations themselves or can request the police to do so and the police are obliged to carry out such requests. Moreover, prosecutors can order witnesses and expert witnesses to testify before them and can even ask an investigating judge (the Ermittlungsrichter) to interrogate witnesses or to examine the evidence. The investigating judge only reviews the legality of the interrogation or inspection and must comply with the prosecutor’s request as long as it is legal.
However, due to their superior manpower, training and experience, the police conduct the vast majority of criminal investigations on their own. Cases are normally only turned over to the prosecutor’s office when they are considered to have been solved or all leads have gone cold. A prosecutor is usually only involved from the very beginning in homicide or serious white-collar crime cases. Police also contact prosecutors at an early stage when significant publicity is expected or they need help gaining a judicial arrest or search warrant etc., or when the Ermittlungsrichter is to interrogate a witness.
In court, the approximately 5,200 public prosecutors in Germany are the prosecuting counsels. Unlike judges, public prosecutors are civil servants and therefore subject to the orders of their superiors.
In investigations and in court, the prosecution is supposed to be "objective" and "neutral". However, instead of the legal principle of the maxim "in dubio pro reo" (Latin: "benefit of the doubt", see presumption of innocence) which applies to judges, the maxim for the prosecution is in dubio pro duriore, that is presumption of guilt. The reason for this is that the courts would be stripped of their proper role if in case of a doubt there were not even a trial, and because proof may yet be found within the trial. Still, it is (or should be) common for the Staatsanwaltschaft to request the acquittal of the defendant if the evidence that came to light in the courtroom or before suggests he or she is innocent. Naturally the defense's opinion often differs from that of the prosecution in this matter.
The next investigating criminal justice body above the Staatsanwaltschaft is, according to the authorities of the separation of powers (Legislative, Exekutive and Judicative) of the German Grundgesetz, the Generalstaatsanwaltschaft.