In 1291, Matthew took part in the campaign of King Andrew III of Hungary against Austria. In the next year, when Nicholas I Kőszegi rebelled against King Andrew III and occupied Pozsony (German: "Pressburg", Slovak: "Prešporok", today "Bratislava") and Detrekő (Slovak "Plavecké Podhradie"), Matthew managed to reoccupy the castles on behalf of the king. Henceforward, the Danube became the border between the developing domains of the Kőszegi and Csák families. King Andrew appointed him to master of the horse and he also became the ispán ("comes") of Pozsony County (1293–1297). On 28 October 1293, Matthew issued a charter and promised that he would respect the liberties of the burghers of the city of Pozsony that King Andrew had confirmed before.