After sixteen years in power, Fianna Fáil lost the 1948 election. John A. Costello was Taoiseach of a coalition Government. It was Costello who declared Ireland a republic, making de Valera's friend President Ó Ceallaigh Ireland's head of state. In 1951 de Valera was returned to power but without an overall majority. Many people thought this was his worst government. He spent several months in the Netherlands where he had six operations on his eyes.