There were two Governments of the 2nd Dáil, which were Ministries of Dáil Éireann, the assembly of Dáil Éireann that was the legislature of the Irish Republic, a unilaterally declared state which lasted from 1919 to 1922. The Second Dáil was elected at the 1921 Irish elections on 24 May 1921. The 3rd Ministry (26 August 1921 – 9 January 1922) was led by Éamon de Valera as president and lasted 136 days. De Valera resigned as president after the Dáil voted to accept the Anglo-Irish Treaty. The 4th Ministry (10 January – 9 September 1922) was led by Arthur Griffith as president. Griffith died in office on 12 August 1922, but a new Dáil ministry was not formed until 9 September 1922. Griffith served 214 days as president, with a further 28 days between his death and the appointment of W. T. Co