The Kingdom of Uí Failghe or Uí Failge /ui ˈfalʲɡe/ was a Gaelic-Irish kingdom which existed to 1550, the name of which (though not the territory) is preserved in the name of County Offaly, Ireland.
County Offaly (originally King's County) was constructed from elements of a number of ancient Irish Kingdoms of which Uí Failghe was one amongst such as Mide (present day west Offaly) and Munster (present day south Offaly). In modern territorial boundaries the kingdom today would correspond with County Offaly east of Tullamore, western parts of Kildare and parts of north east Laois. The name was also retained in the names of two baronies in County Kildare that formed part of the kingdom, Offaly (Ophaley) East and Offaly (Ophaley) West.
Uí Failghe may have existed as a kingdom from the early historic era. It takes its name from the legendary king Failge Berraide (fl. AD 507–514). It successfully fought off encroachments by the Uí Néill, the Eóganachta, and the Normans however with loss of territories. "The traditions of warfare in the fifth century between Ui Neill and Laigin in Brega and Mide ... [show] the Ui Failgi certainly suffered most material damage through the loss of territory in Offaly and Westmeath".
From the mid eleventh century its ruling dynasty adopted the surname Ua Conchobhair Failghe, or O Connor Faly (they were unrelated to the other notable Ua Conchobhair dynasties of Connacht and Kerry). Their seat was originally in Rathangan but moved to Daingean with the Norman arrival. On the death of the last de facto king, Brian mac Cathaoir O Conchobhair Failghe about 1556, Ui Failghe was divided between Queen's County and King's County when it was shired by Mary I of England during one of the Plantations of Ireland. A portion of the original kingdom was made part of County Kildare. Upon Irish independence 'King's County' was renamed County Offaly, in commemoration of Uí Failghe.