Prosecutors in Sweden are not elected. They are selected meritocratically under procedures that are nonpartisan and nonpolitical. They are career civil servants but of a special-highly autonomous-kind. The Swedish prosecutor has three main tasks: to conduct the investigation of an offense (with the assistance of the police), to decide whether or not to prosecute, and to represent the state once a case comes to court. The main principles that apply to the work of the prosecutor are the principle of legality (i.e., in principle, cases have to be investigated and taken to trial if there is reason to expect a conviction) and the principle of impartiality (the prosecutor should also take into account factors that point in favor of the defendant). High importance is also attached to the value of equality (the result should ideally be the same no matter who the prosecutor is or where in Sweden the case is dealt with).