thumb|A small granary (early 19th century), [[Slovenia]]
A granary, also known as a grain house and historically as a granarium in Latin, is a post-harvest storage building primarily for grains or seeds. Granaries are typically built above the ground to prevent spoilage and protect the stored grains or seeds from rodents, pests, floods, and adverse weather conditions. They also assist in drying the grains to prevent mold growth. Modern granaries may incorporate advanced ventilation and temperature control systems to preserve the quality of the stored grains.
Early origins
thumb|Grain storage chambers (ghorfas) of [[Ksar Hadada, southern Tunisia. Ksar Hadada is a fortified granary village that was built by North African Berber communities to store grain and crops]]
thumb |[[Golghar granary built in 1786, Patna, India]]
From ancient times grain has been stored in bulk. The oldest granaries yet found date back to 9500 BC and are located in the Pre-Pottery Neolithic A settlements in the Jordan Valley. The first were located in places between other buildings. Beginning around 8500 BC, however, they were moved inside houses, and by 7500 BC special rooms were used for storage.
Southeast Asia
In vernacular architecture of the Indonesian archipelago, granaries are made of wood and bamboo materials, and most of them are built and raised on four or more posts to avoid rodents and pests. Examples of Indonesian granary styles are the Sundanese leuit and Minang rangkiang.
Great Britain
thumb|A granary sitting on [[staddle stones, at the Somerset Rural Life Museum]]
In the South Hams in southwest Great Britain, small granaries were built on mushroom-shaped stumps called staddle stones. They were built of timber-frame construction and often had slate roofs. Larger ones were similar to linhays but with the upper floor enclosed. Access to the first floor was usually via a stone staircase on the outside wall.
Towards the close of the 19th century, warehouses specially intended for holding grain began to multiply in Great Britain. There are climatic difficulties in the way of storing grain in Great Britain on a large scale, but these difficulties have been largely overcome.
