After Matthias was elected to the Bohemian throne Ferdinand II, a staunch Catholic, began to enforce the Catholic faith. After the second Defenestration of Prague in 1618 the Silesian Estates followed the Bohemian Revolt, elected Frederick V as their new King of Bohemia and paid homage in Breslau. Losing the Battle of White Mountain forced Frederick to flee to Breslau where he failed to gather new troops and advised the Silesians to contact Saxony, which occupied Lusatia, and as an imperial ally was authorized to negotiate. The subsequent "Dresden accord" spared Silesia for the next few years and affirmed the earlier privileges, however the Silesian Estates had to pay 300.000 gulden and accept Ferdinand II as their suzerain. Soon after the emperor (which secured formerly elective Bohemian Crown as an inheritable possession of the Habsburg dynasty) together with the prince-bishop started the counter-reformation by inviting Catholic orders to Silesia and giving land to Catholic peers.