When the Danish king sold Danish Estonia to the Livonian Order in 1346, a large castle was built on top of the previous stronghold. The Ordensburg was protected by towers and courtyards. The building of a Franciscan monastery was started in 1508.