The town is first mentioned as Medilica in 831 in a donation of Louis
the German; the name is from a Slavic word for 'border.' The area around
Melk was given to Margrave Leopold I in the year 976 to serve as a
buffer between the Magyars (called "Turks" in that time's sources) to
east and Bavaria to the west. In 996 mention was first made of an area
known as Ostarichi, which is the origin of the word Oesterreich (German
for Austria). The bluff which holds the current monastery held a
Babenberger castle until the site was given to Benedictine monks from
nearby Lambach by Margrave Leopold II in 1089. Melk received market
rights in 1227 and became a municipality in 1898. In a very small area,
Melk presents a great deal of architectural variety from many centuries