In the 16th century, most of the diocese as well as most of the state of Hildesheim switched to protestantism. But the Bishopric managed to retain its independence from the surrounding Protestant states of Brunswick-Lüneburg, mostly because its bishops were members of the powerful House of Wittelsbach from 1573 until 1761. Among them was Klemens August of Bavaria, who was bishop from 1723 until 1761.