For decades the kingdoms of Bohemia and Poland had disputed sovereignty over the duchies of Silesia. Casimir renounced all Polish claims on Silesia in favor of Bohemia in the provisional treaty of Trentschin, which was to be confirmed in Visegrád later in November 1335. It was not until 9 February 1339 that Casimir ratified the agreement in Krakow, however. The treaty was reaffirmed by the 1348 Treaty of Namslau.