Elvira Ramírez (937–982) was a Leonese princess, nun and regent who governed León during the minority of her nephew Ramiro III. She was the first woman to rule the kingdom and the first to exercise formal authority over royal monastic holdings, a role later associated with the infantado.
Her father, King Ramiro II, made her a nun and established the monastery of San Salvador in León. By the age of 11, she was appearing in court documents. Under her half-brother Ordoño III, she held important records in a land dispute, suggesting the monastery may also have served as a kind of chancery.
After her brother Sancho I died in 962, Elvira became regent. Leonese nobles preferred her to Ramiro III’s foreign-born mother, in part because her status as a nun was thought to make a marriage or alliance less likely. During Viking raids in 968–969, she organised the kingdom’s defence. In 974, her ambassadors were expelled from Córdoba after an offensive exchange with Caliph al-Hakam II. The following year, Elvira joined Ramiro and other Christian leaders at the failed siege of Gormaz. After the defeat, she withdrew from court and was replaced as regent by Queen Teresa.
Elvira later appeared in documents during rebellions against Bermudo II. In her last known document, dated 986, she granted lands the king had already given away, an act suggesting that she did not accept his authority. Historians have differed over her rule: some have portrayed her as constrained by a divided nobility, while more recent scholarship has described her as leading a broad coalition that resisted Córdoba before the military defeat at Gormaz ended her regency.