Portugal. Afonso's son Peter fell in love with his new wife's lady-in-waiting, Inês de Castro. Inês was the daughter of an important noble family from Galicia, with links (albeit illegitimate) to both the royal houses of Castile and Portugal. Her brothers were aligned with the Trastamara faction, and became favorites of Peter, much to the dismay of others at the Portuguese court, who considered them Castilian upstarts. When Constanza died weeks after giving birth to their third child, Peter began living openly with Inês, recognized all her children as his and refused to marry anyone other than Inês herself. His father refused to go to war again against Castile, hoping the heir apparent's infatuation would end, and tried to arrange another dynastic marriage for him. The situation became worse as the years passed and the aging Afonso lost control over his court. His grandson and Peter's only legitimate son, Ferdinand I of Portugal, was a sickly child, while Inês' illegitimate children thrived. Worried about his legitimate grandson's life, and the growing power of Castile within Portugal's borders, Afonso ordered Inês de Castro first imprisoned in his mother's old convent in Coimbra, and then murdered in 1355. He expected his son to give in and marry a princess, but Peter became enraged upon learning of his wife's decapitation in front of their young children. Peter put himself at the head of an army and devastated the country between the Douro and the Minho rivers before he was reconciled to his father in early 1357. Afonso died almost immediately after, in Lisbon in May. Afonso IV's nickname the Brave alludes to his martial exploits. However, his most important accomplishments were the relative peace enjoyed by the country during his long reign and the support he gave to the Portuguese Navy. Afonso granted public funding to raise a proper commercial fleet and ordered the first Portuguese maritime explorations. The conflict with Pedro, and the explorations he initiated, eventually became the foundation of the Portuguese national epic, Os Lusíadas by Luís de Camões. The dramatic circumstances of the relationship between father, son and Inês was used as the basis for the plot of more than twenty operas and ballets. The story with its tragic dénouement is immortalized in several plays and poems in Portuguese, such as Os Lusíadas by Luís de Camões (canto iii, stanzas 118–135), and in Spanish, including Nise lastimosa and Nise