In 1476, King Afonso V of Portugal granted Dom Lopo de Almeida, a descendant of King Pedro I of Portugal through an illegitimate line, the title of Count of Abrantes, which became extinct when Dom Miguel de Almeida, 4th Count of Abrantes and a Restoration hero, died without issue.