The melody was adapted from the opera Il Guarany (1870) by Carlos Gomes. Francisco Manuel da Silva arranged it with new lyrics. It was officially adopted in 1890 after the Republic's proclamation.
The tune bears a striking resemblance to France's "La Marseillaise"—a deliberate nod to revolutionary ideals.