The Staatsanwaltschaft or public prosecutors' 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 Mainland China, Taiwan and in some countries in Central Europe including Slovakia, Slovenia and the Czech Republic, as well as Macau, which continues to follow the Portuguese legal system.
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.