Marshal Manuel Deodoro da Fonseca ( Alagoas City , August 5 , 1827 - Rio de Janeiro , August 23 , 1892 ) was the first president of the Republic of Brazil and he reached this position after a military strategy that put down the Emperor Pedro II . Marshal Manuel Deodoro da Fonseca ( ; August 5 , 1827 - August 23 , 1892 ) became the first president of the Republic of Brazil after heading a military coup that deposed Emperor Pedro II .