Prieto became personal secretary of Valentín Gómez Farías and Anastasio Bustamante, in succession. Under Bustamante he was editor of "El Diario Oficial". He was minister of finance (hacienda) under Presidents Mariano Arista, Juan Álvarez and Benito Juárez. He was a congressional deputy 15 times and a representative of Puebla in the constituent congress of 1856-57. Together with other Liberals he supported the Plan de Ayutla, proclaimed March 1, 1854 and aimed at overthrowing dictator Antonio López de Santa Anna. For this he suffered temporary exile in Cadereyta, Guanajuato. As minister of finance under President Juárez, he accompanied the president into exile after the coup by Félix Zuloaga.