The period from the second half of the 17th century to the second third of the 18th century was marked by confiscations and emigration of the Czech intelligentsia after the Battle of White Mountain. The function of the literary language was limited; it left the scientific field first, the discerning literature later, and the administration finally. Under the rule of Holy Roman Emperor Ferdinand II, who also reigned as king of Bohemia, the use of Czech was discouraged due to its association with Protestantism, and relegated to a spoken peasant tongue. However, puppeteers continued to use Czech for public marionette shows, and popular legend has it that this preserved the Czech language from extinction at home.