A stud farm or stud in animal husbandry is an establishment for selective breeding of . The word "stud" comes from the Old English stod meaning "herd of horses, place where horses are kept for breeding". Historically, documentation of the breedings that occur on a stud farm leads to the development of a stud book. Male animals made available for breeding to outside female animals are said to be "standing at stud", or at "stud service", referencing the relatively high probability that they are kept at a stud farm.
The word stud is often restricted to larger domesticated (especially farm) animals, such as cattle and horses. A specialized vocabulary exists for the studs of other animals, such as kennel (dog), cattery (cat) and aviary (birds).
During the Middle Ages, stud farms were often managed as part of a monastery. At the time, few people apart from monks could read and write, and so they were charged with the responsibility of recording pedigrees. The Carthusian monks are famous for their role in breeding the Andalusian horse in Spain, while monasteries in Bavaria were responsible for the original Rottaler horse.
A state stud farm (German: Landgestüt, French: Haras) is one that is owned by the government. The first state studs were ordered by Louis XIV of France in 1665. The purpose of the state studs was to make high-quality horses available to local breeders and farmers to accelerate the evolution of local horses. Stud farms which kept a herd of mares in addition to stallions were dubbed "Principal" Studs. State-owned stallions were made accessible with low or no stud fees. Germany is most famous for its Principal and State Studs, which have been instrumental in the shaping of the German riding horses and several breeds of German cold bloods. The Hanoverian is associated with the State Stud of Celle, the Rhinelander and Westphalian with the State Stud of Warendorf, the Brandenburger with the Principal Stud of Neustadt an der Dosse, and so on.