Why were some Royal Navy ships assigned as harbour guard ships in the age of sail?
Short answerThey protected harbour approaches and could serve instead of, or alongside, fixed forts.
NotesThe assignment turned an existing warship into a fixed layer of local defence. Its guns and crew could challenge vessels trying to enter a harbour or damage ships and infrastructure inside. A guard ship could supplement shore forts where the approaches needed another firing position. In some locations it provided protection without the expense or delay of constructing a new fortification. The role explains why an old ship could remain useful after it was no longer suited to cruising with the fleet.