the king, the last male member of the Árpád dynasty, died on 14 January 1301, and following his death a rivalry broke out among the several claimants for the throne. At that time, Matthew's brother, Csák died childless and therefore Matthew inherited his possessions. Following the death of King Andrew III, he became the Neapolitan prince's follower, but shortly afterwards, he joined the party that offered the crown to Wenceslaus, the son of King Wenceslaus II of Bohemia. He was present at the coronation of the young Bohemian prince (27 August 1301) who granted him Trencsén and Nyitra counties; therefore he became the lawful holder of all the royal castles and possessions in the two counties. In the following years, Matthew Csák occupied the possessions of the Balassa family in the two counties and he also took several castles in Nógrád and Hont counties. 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. On 10 October 1307, an assembly confirmed King Charles' rule, but Matthew Csák and some other oligarchs (Ladislaus Kán, Ivan and Henry II Kőszegi) absented themselves from the assembly. In 1308, Pope Clement V sent a legate to the kingdom in order to strengthen King Charles' position. The legate, Cardinal Gentile Portino da Montefiore managed to persuade Matthew to accept King Charles' rule at their meeting in the Pauline Monastery of Kékes (10 November 1308). Although Matthew himself was not present at the following assembly (27 November) in Pest where King Charles' reign was again confirmed, he sent his envoy to attend at the meeting. Shortly afterwards, King Charles appointed Matthew Palatine of the kingdom. However, at the new coronation of King Charles (15 June