Although there have been permanent garrisons in Northern Ireland throughout its history, the British Army was deployed as a peacekeeping force from 1969 to 2007 in Operation Banner. Initially, this was (in the wake of unionist attacks on nationalist communities in Derry and Belfast) to prevent further loyalist attacks on Catholic communities; it developed into support of the Royal Ulster Constabulary (RUC) and its successor, the Police Service of Northern Ireland (PSNI) against the Provisional Irish Republican Army (PIRA). Under the 1998 Good Friday Agreement, there was a gradual reduction in the number of soldiers deployed. In 2005, after the PIRA declared a ceasefire, the British Army dismantled posts, withdrew many troops and restored troop levels to those of a peacetime garrison.