Brandenburg continued to flourish. Admitting only noblemen, principally from the Germanies, the Bailiwick maintained hospitals and other institutions to care for the poor, the sick, and the injured. Elections of successive Herrenmeister (including a Roman Catholic, Adam von Schwarzenberg, in 1641) were announced to the Grand Prior of Germany in the Roman Catholic Order of Malta and, in accordance with the requests from the governing authorities of the Order of Malta, responsions (periodic remittances from revenues) were paid to the Grand Priory. The horrific Thirty Years' War devastated the Bailiwick, resulting in the deaths of many knights and the destruction of much of the wealth of the Bailiwick. By the terms of the Peace of Westphalia ending the conflict, the Bailiwick was effectively placed under the protection of the Prince Electors of Brandenburg, later Kings of Prussia, members of the House of Hohenzollern. Under this protection, the Johanniterorden, as the Order came to be known, came to be headquartered at Sonnenburg Castle in the Neumark of Brandenburg, east of the Oder River, though the Herrenmeister resided in the Ordenspalais in Berlin from its completion in 1738. As the intense sectarianism of early modern Europe gave way to the Enlightenment, further if sporadic attempts were made to accommodate the Protestant Bailiwick within the Roman Catholic Order of Malta. Despite cordial relations, however, including payment of responsions to Malta and participation of delegates from the Bailiwick in the Chapter General of the Order of Malta in 1776, nominal reunion of the two orders was prevented by the withholding of papal approval. The Order in the nineteenth century and thereafter In 1811 and 1812, as protector of the Order, King Frederick William III of Prussia transferred the powers of the Herrenmeister and the Chapter (the governing council of the Order) to the Prussian Crown, effectively dissolving the Bailiwick and confiscating its possessions. In its place he established a similarly named order of merit, the Royal Prussian Order of Saint John which also had similar insignia. The Herrenmeister of the Bailiwick, Prince August Ferdinand, became the first grand master of the new order of merit and continued to reside in the Ordenspalais, the palace of the Bailivick of Brandenburg. All knights of the Bailiwick became members of the new order of merit. In 1852 the order of merit was in its turn dissolved and King Frederick William IV of Prussia, again exercising the powers