 Eventually, on 1 January 1345, his mediation resulted in the official alliance between the Wittelsbachs, Poland and Hungary.Soon afterwards, King Casimir III (The Great) of Poland used this new alliance in his favor.The Polish King imprisoned King John's eldest son and heir Charles, Margrave of Moravia (future Holy Roman Emperor).