There shall be a district attorney for each district set forth in the following section, who shall be a resident therein and a member of the bar of the commonwealth and shall be elected as provided by section one hundred and fifty-four of chapter fifty-four. He shall serve for four years beginning with the first Wednesday of January after his election and until his successor is qualified.
The district attorney shall appear for a county constituting such district in all civil actions in which such county is a party under the provisions of chapter two hundred and fifty-eight.
Mass. Gen. Laws ch. 12, § 12