A sheriff is a government official, with varying duties, existing in some countries with historical ties to England, where the office originated. There is an analogous although independently developed office in Iceland that is commonly translated to English as sheriff, and this is discussed below.
Historically, a sheriff was a legal official with responsibility for a "shire" or county. In modern times, the specific combination of legal, political and ceremonial duties of a sheriff varies greatly from country to country.
The word "sheriff" is a contraction of the term "shire reeve". The term, from the Old English scīrgerefa, designated a royal official responsible for keeping the peace (a "reeve") throughout a shire or county on behalf of the king. The term was preserved in England notwithstanding the Norman Conquest. From the Anglo-Saxon kingdoms, the term spread to several other regions, at an early point to Scotland, latterly to Ireland and to the United States.
In British English, the political or legal office of a sheriff, term of office of a sheriff, or jurisdiction of a sheriff, is called a shrievalty in England and Wales, and a sheriffdom in Scotland.
In New South Wales, the Australian prisons were initially overseen by the provost marshal. The Charter of Justice in 1824 replaced the provost marshal with the sheriff. In addition to detaining accused criminals awaiting trial, the sheriff executed death sentences and other sentences, controlled gaols, and handled prison movements, including the chain gangs that worked on Goat Island and in Sydney. In 1867, the sheriff began to be replaced by an independent Prisons Department, led by an inspector general, which was later renamed comptroller general. Most Australian states adopted this mode of prison oversight for many years.