The bluff which holds the current monastery held a Babenberger castle until the site was given to Benedictine monks from nearby Lambach by 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.