Matías Barrio commenced his teaching career as an interim assistant professor in Valladolid in 1864-65, the following year nominated assistant professor in Comparative Law at Facultad de Derecho at Central in Madrid. As in 1869 he completed the required 25 years of age, following an unsuccessful bid for the chair of Derecho Romano at Central, he applied and won the chair of Derecho Político y Administrativo español and Derecho Político de los principales Estados at Universidad Literaria in Vitoria, a local Álavese institution managed by its self-government. In 1873 the local ayuntamiento fired Barrio for his refusal to join Batallón de Voluntarios de la República; one year later, in full swing of the Third Carlist War, the governmental order released him from the chair of Geografia Historica at Universidad de Zaragoza.