The Kilkenny City by-election of 1917 was held on 10 August 1917. The by-election was held due to the death of the incumbent Irish Parliamentary MP, Pat O'Brien. It was won by the Sinn Féin candidate W. T. Cosgrave, which he won while he was in prison for his role in the Easter Rising, who defeated John Magennis, a three-time mayor. Magennis went on to be Mayor three more occasions, while Cosgrave went on to serve for ten years as President of the Executive Council of the Irish Free State.
References
Kilkenny City by-election, 1917 Wikipedia(Text) CC BY-SA