 Weimar acquired woad trade privileges in 1438.The castle and the walls were finished in the 16th century, making Weimar into a full city.After the Treaty of Leipzig (1485) Weimar became part of the electorate of the Ernestine branch of Wettins with Wittenberg as capital.