<P> A state 's attorney or state attorney is a lawyer representing the interests of the state in a legal proceeding , typically as a prosecutor . It is an official title in the United States , sometimes appointed but most commonly an elected official serving as the chief law enforcement officer of his or her county , circuit , or district . The offices of district attorney , commonwealth 's attorney , county attorney , county prosecutor , or prosecuting attorney are more frequently the case in the United States although South Carolina uses the term solicitor . Other countries also use or used the term state attorney , like the Boer republics of the Orange Free State ( 1854 -- 1902 ) and the South African Republic ( 1852 -- 1902 ) in South Africa . In these cases the position corresponded to that of the attorney general in the British judicial system . It is used within the Attorney - General 's Department of Sri Lanka . </P>
who acts as the state 's chief legal officer and counsel and represents the state in the courts
state attorney