Álvaro Pires de Castro (1310–June 11, 1384) was a Galician-Portuguese nobleman and military commander who became the first Count of Viana da Foz do Lima, the first Count of Arraiolos, and Portugal’s first constable. Born in the Kingdom of Galiza, he was the illegitimate son of Pedro Fernández de Castro and Aldonza Lorenzo de Valladares. His siblings included Inês de Castro and the Galician nobleman Fernando Ruiz de Castro.
He settled in Portugal during the 1340s and joined the circle of Infante Peter, later King Peter I. After Peter succeeded to the throne in 1357, Álvaro became a leading figure at court. In 1371, King Ferdinand I granted him the title of Count of Viana da Foz do Lima; Ferdinand made him Count of Arraiolos in 1377 and appointed him constable in 1382. Álvaro also served for a time as alcaide-mor of Lisbon and held the lordships of Cadaval and other lands.
During the Portuguese-Castilian war of 1381–1382, Álvaro commanded the king’s army. In the succession crisis that followed Ferdinand’s death in 1383, he broke with the queen-regent Leonor Telles de Menezes and sought to advance the claims of his nephews, the sons of Inês de Castro. His position toward John, Master of Aviz, shifted as their political aims diverged.
Álvaro married Maria Ponce de León around 1340. Their children included Pedro, lord of Cadaval; Brites; Isabel; and Afonso. He died in Lisbon on June 11, 1384, and was buried beside his wife at the monastery of São Domingos. John of Aviz subsequently appointed Nuno Álvares Pereira as Portugal’s second constable and Count of Arraiolos.