Tanistry was a Gaelic system for passing on titles and lands. In this system the Tanist (Irish: Tánaiste; Scottish Gaelic: Tànaiste; Manx: Tanishtey) was the office of heir-apparent, or second-in-command, among the (royal) Gaelic patrilineal dynasties of Ireland, Scotland and Man, to succeed to the chieftainship or to the kingship.
The Tanist was chosen from among the heads of the roydammna or "righdamhna" (literally, those of kingly material) or, alternatively, among all males of the sept, and elected by them in full assembly. The eligibility was based on patrilineal relationship, which meant the electing body and the eligibles were agnates with each other. The composition and the governance of the clan were built upon male-line descent from a similar ancestor. The office was noted from the beginning of recorded history in Ireland, and probably pre-dates it. A story about Cormac mac Airt refers to his eldest son as his Tanist. Following his murder by a member of the Deisi, another roydammna, Eochaid Gonnat, succeeded as king.
In Ireland, the tanistry continued among the dominant dynasties, as well as lesser lords and chieftains, until the mid-16th century when it was replaced by English common law. When in 1943 Ireland appointed its first new Chief Herald, it did not reintroduce tanistry. The state granted courtesy recognition to Irish chiefs based on primogeniture from the last known chief.