The 1917 South Longford by-election was held on 9 May 1917 due to the death of the incumbent Irish Parliamentary MP, John Phillips.
The by-election ended in a surprise Sinn Féin victory over the Irish Parliamentary Party following a very close vote.
Joseph McGuinness was selected against his will as Sinn Féin's candidate for the by-election.
The prisoners in HM Prison Lewes, where McGuinness and other leaders of the Easter Rising were being held, were opposed to standing a candidate because the Irish Parliamentary Party looked likely to win, so McGuinness declined to stand.
The result of the by-election increased pressure on the British Government to free the remaining Irish prisoners in Lewes.