Melk is a city of Austria, in the federal state of Lower Austria, next to the Wachau valley along the Danube. Melk has a population of 5,222 (as of 2001). The area around Melk was given to Margrave Leopold I in the year 976 to serve as a buffer between the Turks and Huns to east and Bavaria to the west. In 996 mention was first made of an area known as Ostarichi - which is recognized as 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.