Undersheriff
An undersheriff is an office derived from ancient English custom and remaining in, among other places, England and Wales and the United States, though performing different functions.
United States
In American law enforcement, the undersheriff is the person second in charge of a sheriff's office. In some departments, the title of undersheriff is official, while in others, a different official title is used for the second person in charge. For example, in many small departments, the title of chief deputy sheriff is often used for the second in command; however, in some large departments, the undersheriff is second in command and in turn oversees several chief deputies. In some places, the undersheriff is the prison warden of the county jail.
The New York City Sheriff's Office has five undersheriffs: each one is responsible for a borough of New York City, with the Sheriff of the City of New York overseeing all of them.
United Kingdom
In the England, Wales, and Northern Ireland, but not in Scotland, the undersheriff is the deputy of the high sheriff and is appointed directly by the high sheriff. In practice, the undersheriff performs most of the legal functions of the sheriff for him or her. The same person (usually a solicitor) is appointed annually by successive sheriffs over many years, leaving the sheriff to perform the ceremonial functions of the office.