The childless royal couple intended to conduct an election of a new monarch while John was still alive (election vivente rege). Their candidate was Henri Jules, Prince of Condé. In order to strengthen his position, the Duchy of Opole-Racibórz was passed to him as a dowry for his wife - Anne Henriette of Bavaria - the queen's niece. This was contested by emperor Leopold I who repurchased the Duchy on 21 May 1666 for 120 000 guldens. After the Habsburgs regained Upper Silesia, tolerance for the Protestant population ended and a program of counterreformation for the northern parts of the Duchy was introduced.