Alfredo Keil (* July 3, 1850 in Lisbon; † October 4, 1907 in Hamburg) was a Portuguese composer, painter and collector of Portuguese art. His best-known piece is the song "A Portuguesa", which became the Portuguese national anthem in 1911. Henrique Lopes de Mendonça wrote the lyrics.
The patriotic song, composed in 1890-1891, had its origins in a strong nationalist movement that had gripped Portugal during this period. The cause was an English ultimatum. At the time, Portugal was anxious to unite the two colonies of Angola and Mozambique. In between, however, lay British territory, and Great Britain wanted to build a rail link from Cape Town to Cairo. The then Prime Minister Salisbury called on Portugal to give up its claims, which the Portuguese government then did. This led to an outcry from the people, who felt humiliated.