Various legends about the origins of the custom of having small snacks with a drink—an age-old tradition in Spanish inns and taverns—have been attributed to various monarchs. One legend has it that during the reign of King Alfonso X "The Wise" in the 13th century, tapas began to be served as an accompaniment to drinks to prevent drunkenness.