After the accession of the House of Braganza to the Portuguese throne in 1640 as a replacement for the Philippine Dynasty of Spanish Habsburgs, the Dukedom of Braganza became linked to the crown. "Duke of Braganza" became the traditional title of the heir to the Portuguese throne, together with or alternate to "Prince of Beira", much as "Prince of Wales" is in the United Kingdom. After the 8th Duke had ascended the royal throne, he elevated his son and heir Teodósio to the newly created rank of Prince of Brazil in 1645, but granted the Duchy of Braganza to his brother, the Infante Duarte, who died in 1649 in Spanish captivity. Then it was granted to the king's second son, the future Afonso VI of Portugal.