Aghast and ghastly are old words from The Middle Ages. The original spellings were agast and gastly deriving from the Old English word gast or gaest, meaning spirit or ghost. Agast literally described someone who had seen a ghost and was thus affrighted or amazed. The German loanword poltergeist, literally a noisy ghost, comes from a similar root. Agast and gastly started to appear as aghast and ghastly from the 17th century onwards, probably to fall in line with the spelling of ghost, which derives from the Flemish and Middle Dutch spelling of gheest rather than the Old English spelling without the h.