In 1843, at the age of sixteen, Deodoro enrolled himself in the Rio de Janeiro Military Academy and finished the artillery course in 1847. In 1845, he was already a 1 class cadet. In 1848, he took part in his first military action, helping to repress the Praieira Revolt, an insurrection promoted by the Liberal Party of Pernambuco.