The attorney general of the United States is the head of the Department of Justice and the federal government’s chief law enforcement officer, responsible for representing and advising the government in legal matters and overseeing the administration of federal laws. The office was established by the Judiciary Act of 1789, and attorney generals are nominated by the president and confirmed by Congress. U.S. states, commonwealths and territories have attorney generals as well; their authority includes enforcing state (or territory) laws, prosecuting state civil suits, proposing legislation and representing the state in court proceedings.