The aftercastle[pronunciation?] (or sterncastle, sometimes aftcastle) is the stern structure behind the mizzenmast and above the transom on large sailing ships, such as carracks, caravels, galleons and galleasses. It usually houses the captain's cabin and perhaps additional cabins and is crowned by the poop deck, which on men-of-war provided a heightened platform from which to fire upon other ships; it was also a place of defence in the event of boarding. More common, but much smaller, is the forecastle.
As sailing ships evolved, the aftercastle gave way to the quarterdeck, whose span ran all the way to the main mast.