 By the 9th century the Ó Ruaircs had established themselves as kings of Breifne.In the 10th and 11th centuries the Ó Ruairc kings of Breifne fought some battles for the title of king of Connacht, four different kings of Breifne gaining the title.During the 12th century the reign of Tighearnán Ua Ruairc, the kingdom of Breifne was said to comprise most of the modern counties of Leitrim and Cavan, and parts of Longford, Meath, Fermanagh and Sligo.