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,257. It is best known as the site of a massive baroque Benedictine monastery named Melk Abbey.
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 to east and Bavaria to the west. In 996 mention was first made of an area known as Ostarrîchi, which is the origin of the word Österreich. 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.