Louis I of Hungary always kept good and close relationships with the Holy Roman Emperor Charles IV of Luxembourg and finally proclaimed Charles's son Sigismund of Luxembourg to succeed him as King of Hungary. Sigismund became a renowned king who created many improvements in the Hungarian law system and who rebuilt the palaces of Buda and Visegrád. He brought materials from Austria and Bohemia and ordered the creation of the most luxurious building in all of central Europe. In his laws can be seen the traces of the early mercantilism. He worked hard to keep the nobility under his control. A great part of his reign was dedicated to the fight with the Ottoman Empire, which started to extend its frontiers and influence to Europe. In 1396 was fought the Battle of Nicopolis against the Ottomans, which resulted in a defeat for the Hungarian-French forces led by Sigismund and Philip of Artois, Count of Eu. However, Sigismund continued to successfully contain the Ottoman forces outside of the Kingdom for the rest of his life.