The unit had begun to form on 17 February 1797, but even before being officially accepted its first duty was to guard the French prisoners of war confined at Stapleton Prison after the Militia regiments stationed in the city were sent to deal with the French landing in Pembrokeshire on 22 February 1797 (the Battle of Fishguard).