A further military offensive secured the Free State control over the other major towns and cities in its territory by the beginning of August. Despite their defeat in open warfare, the IRA regrouped and took up a guerrilla campaign, as they saw it, to restore the Irish Republic. The war dragged on in a guerrilla form until April 1923. In August 1922, the Free State was rocked by the death of its two main leaders. Michael Collins was killed in an ambush at Béal na mBláth, Cork, on 22 August 1922 and Arthur Griffith died of a stroke a week earlier. W. T. Cosgrave assumed control of both the Irish Republic's cabinet and the Provisional Government and both administrations disappeared simultaneously shortly afterwards, replaced by the institutions of the Irish Free State on 6 December 1922.