Gin is a spirit which derives its predominant flavour from juniper berries (Juniperus communis). From its earliest origins in the Middle Ages, gin has evolved from a herbal medicine to an object of commerce in the spirits industry. Gin was developed on the basis of the older jenever, and became popular in Great Britain (particularly in London) when William of Orange, leader of the Dutch Republic, occupied the English, Scottish, and Irish thrones with his wife Mary. Gin is one of the broadest categories of spirits, represented by products of various origins, styles, and flavour profiles that all revolve around juniper as a common ingredient.
The Dutch physician Franciscus Sylvius is often falsely credited with the invention of gin in the mid 17th century, although the existence of genever is confirmed in Philip Massinger's play The Duke of Milan (1623), when Sylvius would have been about nine years old. It is further claimed that English soldiers who provided support in Antwerp against the Spanish in 1585, during the Eighty Years' War, were already drinking genever for its calming effects before battle, from which the term Dutch Courage is believed to have originated.
The earliest known written reference to genever appears in the 13th century encyclopaedic work Der Naturen Bloeme (Bruges), with the earliest printed recipe for genever dating from 16th century work Een Constelijck Distileerboec (Antwerp).
By the mid 17th century, numerous small Dutch and Flemish distillers (some 400 in Amsterdam alone by 1663) had popularized the re-distillation of malt spirit or malt wine with juniper, anise, caraway, coriander, etc., which were sold in pharmacies and used to treat such medical problems as kidney ailments, lumbago, stomach ailments, gallstones, and gout. Gin emerged in England in varying forms as of the early 17th century, and at the time of the Restoration, enjoyed a brief resurgence. When William of Orange, ruler of the Dutch Republic, occupied the British throne with his wife Mary in what has become known as the Glorious Revolution, gin became vastly more popular, particularly in crude, inferior forms, where it was more likely to be flavoured with turpentine as an alternative to juniper.