In the United States, most district attorneys get their jobs by winning a partisan or nonpartisan local election, but a significant minority are initially appointed—by a governor, a county board, or a court—to fill a vacancy, and a few jurisdictions use other selection methods; the exact answer depends on the state and sometimes the county, so the question has no single national rule.

The phrase "district attorney" itself is not uniform. It is the usual title in New York and Pennsylvania and appears widely elsewhere, but the same office is called a prosecuting attorney, state's attorney, commonwealth's attorney, county attorney, solicitor, or prosecutorial attorney in different states. Some states have elected attorneys general who supervise local prosecutors; others have highly independent local offices. Because criminal prosecution is chiefly a state and local function, the hiring method is set by state constitutions, statutes, and local charters—not by any federal rule. That is the central ambiguity: "district attorney" describes a role, not one standardized appointment process.

The dominant path: a local election

In the large majority of states, the chief local prosecutor is a elected official with a fixed term, typically four years, though terms of two, four, and six years all appear. Candidates run under the rules their state sets:

Partisan elections in which candidates carry a party label and first win a primary, then a general election. Nonpartisan elections in which candidates appear without party designation, often with a primary or a runoff if no one wins a majority. Hybrid arrangements, such as nonpartisan primaries followed by partisan general elections, or retention elections in which an incumbent stands for yes/no approval rather than against an opponent.

To get on the ballot, a candidate generally must meet statutory qualifications—usually a licensed attorney in good standing, a resident of the jurisdiction, sometimes a minimum period of practice or local residency, and of voting age—and must gather nominating signatures or pay a filing fee. Campaigns are funded privately, and many states impose disclosure requirements. Once elected, the district attorney typically takes office at the start of the next calendar year or as the statute specifies.

Election has meaningful consequences. It makes the prosecutor politically accountable to local voters, and it means the job is won through a combination of legal credentials, name recognition, endorsements, fundraising, and community ties. It also means a sitting district attorney can be removed by voters at the next cycle, and in many states by recall, impeachment, or a governor's removal for cause.

The other common path: appointment to fill a vacancy

When an elected district attorney resigns, dies, retires, or is removed mid-term, the office does not usually stay empty until the next general election. State law provides a fill mechanism, and the details vary sharply:

Gubernatorial appointment. In many states the governor appoints a replacement, sometimes from a list submitted by the local party of the departing prosecutor, sometimes with senate confirmation, and sometimes with a requirement to call a special election. County or local governing body appointment. In some states a county board, board of supervisors, or similar body fills the vacancy. Court appointment. A few states authorize a court, often the presiding judge of the district, to appoint an interim prosecutor. Party committee selection. Some statutes let the local political party committee nominate the replacement, with the governor or board confirming.

The appointee usually serves until the next scheduled election, and depending on the state, that may mean finishing the unexpired term or standing for election at the next general election for the remainder of the term. These interim appointments are how many sitting district attorneys actually first entered the office.

Where appointment is the regular method, not just the vacancy fix

A minority of states do not elect local prosecutors at all, or elect them only in some jurisdictions:

Appointed statewide or district prosecutors. Some states give the governor appointment power over prosecutors in specified districts, or have the attorney general or a state agency oversee prosecution in some areas. County attorneys in some states are appointed by county executives or boards rather than elected. Municipal or city prosecutors in some places are appointed by the city's chief executive or council, distinct from the county-level district attorney.

Within a single state, the method can also differ by jurisdiction. A state may elect district attorneys in most counties but provide appointed "prosecuting attorneys" for a particular judicial district, or handle city ordinance prosecutions through a separate appointed office. Anyone researching a specific office should check that state's constitution and statutes for the office in question, not assume the statewide pattern applies everywhere.

How the job is actually obtained day to day: the office, not just the title

Getting the top job is distinct from getting a job in the office. A district attorney's office employs assistant district attorneys, investigators, victim advocates, and administrative staff, and those positions are typically hired through civil-service or at-will processes administered by the elected or appointed district attorney. Assistants are usually licensed attorneys; hiring may involve interviews, writing samples, background checks, and sometimes a civil-service exam. These are ordinary public-sector jobs, and they are not obtained by election.

This distinction explains a common confusion: people ask "how does the district attorney get their job" meaning the elected official, but many people who work in the office got their jobs through a standard hiring process. The elected district attorney sets office policy, hiring priorities, and case strategy; the assistants carry out the work.

Qualifications, restrictions, and removal

Statutory qualifications are usually modest but real. Most states require the district attorney to be a licensed attorney and a resident of the jurisdiction, and some require a period of practice—often several years—before taking office. A few states impose age or citizenship requirements. Practice requirements matter because prosecution involves charging decisions, grand jury presentations, plea negotiations, and trials, and states want experienced counsel.

The office is also subject to conflict-of-interest rules. A district attorney typically must recuse from cases involving close relatives, prior representation, or personal financial interest, and a court or another prosecutor may take over. Many states provide for removal by the governor for misconduct, by the legislature through impeachment, by recall election, or by court action, and professional discipline by the state bar can affect the license needed to hold the office.

What varies and what stays the same

The stable core across the United States is that the chief local prosecutor is a public official whose selection is governed by state law, usually through election, with appointment as the standard mechanism for filling mid-term vacancies. What varies is which method applies, the term length, partisan or nonpartisan status, filing and qualification rules, and who fills a vacancy. Two neighboring states can therefore answer the question differently, and within one state a city prosecutor and a county district attorney may be selected in different ways.

A practical way to answer the question for a specific office is to identify the jurisdiction, then check that state's statutes or secretary of state guidance on the office, the local election calendar, and any charter provisions for the county or city. Those sources, not a general assumption, determine how the job is filled. The reference date of November 14, 2026, is a reminder that election cycles and statutory details change, so current official guidance should be consulted for any particular race or appointment.