In the United States, a district attorney (DA), county attorney, county prosecutor, state attorney, state's attorney, prosecuting attorney, commonwealth's attorney, or solicitor is the chief prosecutor or chief law enforcement officer representing a U.S. state in a local government area, typically a county or a group of counties. The exact scope of the office varies by state. Generally, the prosecutor is said to represent the people of the jurisdiction in the state's courts, typically in criminal matters, against defendants. District attorneys are elected in almost all states, and the role is generally partisan. This is unlike similar roles in other common law jurisdictions, where chief prosecutors are appointed based on merit and expected to be politically independent.
The prosecution is the legal party responsible for presenting the case against an individual suspected of breaking the state's criminal law, initiating and directing further criminal investigations, guiding and recommending the sentencing of offenders, and are the only attorneys allowed to participate in grand jury proceedings. The prosecutors decide what criminal charges to bring, and when and where a person will answer to those charges. In carrying out their duties, prosecutors have the authority to investigate persons, grant immunity to witnesses and accused criminals, and plea bargain with defendants.