Matthias was born into the gens (clan) Rátót, which originated from Apulia and settled down in Hungary in late 11th century, according to Simon of Kéza's Gesta Hunnorum et Hungarorum.
[2] According to the narration of Roger of Torre Maggiore's Carmen Miserabile, Matthias grew up in the royal court of Andrew II together with heir Béla, therefore possibly he was born in the early 1200s (historian Nándor Knauz considered 1206 as the year of birth).
[1][3] Since his early years, Matthias belonged to Duke Béla's confidants, who strongly opposed his father "useless and superfluous perpetual grants" which caused the derogation of the royal power in the realm.
[4] In both capacities, he had an influence on the issuance of diplomas, which is confirmed by the philological similarity of the arengas of documents issued by the two institutions, the bishopric of Zagreb and Béla's ducal court.
Following that several ecclesiastical and secular illustrious persons – including Béla IV himself and his younger brother Duke Coloman – testified in favor of the legitimacy of Matthias's election.
[11] During the First Mongol invasion of Hungary, Matthias and his deputy, archdeacon Albert gathered their army in Esztergom and joined Duke Coloman's troops, marching together to Pest.