A dramatic moment in Nikolaus's career occurred in 1809. Napoleon, having just defeated the Austrian armies and occupied Vienna, sought to weaken the Habsburg monarchy by severing its Hungarian territories. Nikolaus was Napoleon's candidate to serve as King of an independent Hungary. Faithful to the Esterházy tradition of loyalty to their Emperor, Nikolaus refused the offer, and indeed he went further and raised a regiment of volunteers to help defend the Empire, an action he had previously taken in 1797. Hungary remained part of the Empire until the 20th century.