King Wenceslaus could not strengthen his rule against his opponent and he had to leave the kingdom (August 1304). By that time Matthew Csák had already left King Wenceslaus' party, and shortly afterwards he made an alliance with Duke Rudolph III of Austria against the king of Bohemia. Although he did not join to King Charles' partisans, but his troops took part in the campaign King Charles and Duke Rudolph lead against the Kingdom of Bohemia (September–October 1304). The internal struggles, however, did not end, because on 6 December 1305 a new claimant, Otto III, Duke of Bavaria was crowned King of Hungary. Matthew Csák did not accept King Otto's rule, and his troops struggled together with King Charles' armies who occupied some castles on the northern part of the kingdom.