A prosecutor is a specific type of attorney who takes part in a criminal trial. What are his or her courtroom responsibilities?

To represent a defendant who cannot afford to hire an attorney for a trial.
To represent the litigants in the case and protect them from the reach of the government.
To represent the state or federal government in a prosecution of someone accused of a crime.
To represent the judge and work to ensure the proceedings of the trial are smooth.