On a wooden sailing vessel, a quarter gallery is an enclosed balcony or projection located on either side of the hull toward the stern. It is usually connected to the stern gallery. The name derives from the fact that the sides of the ship toward the stern are known as the quarters, while the term "gallery" originates in domestic architecture, where a gallery was an enclosed or partly-enclosed interior balcony.
A quarter gallery was an external projection, with the wall or bulkhead that separated it from the main cabin actually being the hull of the ship. Slots in the hull supported the beams which made up the frame of the gallery. Together with the stern gallery, the quarter galleries made up a rough box of projections which enclosed the stern of the vessel.
A quarter gallery had a variety of uses, depending on the function of the vessel and the choices of its captain. The role of the quarter gallery also changed over time, with the quarter galleries of 18th and 19th century vessels being very different from those of their 17th century predecessors. Stern galleries played a role in combat, sanitation and accommodation.
The quarter galleries of sailing vessels in the 17th century played a role in naval combat. During a battle, sharpshooters armed with muskets could stand in these galleries and fire at enemy vessels. The quarter galleries of vessels such as the Swedish warship Vasa, which sank in 1628, have narrow windows to offer maximum protection to musketeers firing from them. By the late 18th century, however, this seems to have changed. The quarter galleries of HMS Victory, launched in 1765, have rows of glazed windows which would not be a suitable position for sharpshooters.
The large rows of glazed windows in Victory's quarter galleries, however, would let in light for the cabins at the stern of the ship. By the 18th century, this seems to have been the main function of the quarter gallery. Since space was at a premium on board a ship, even the minimal amount of extra room afforded by a quarter gallery was highly valuable. Galleries might be used as small private offices or bedrooms, especially in a vessel carrying passengers. It was also very common for one of the quarter-galleries attached to the captain's quarters to be used as a latrine, especially in frigates and smaller vessels with only one tier of galleries.