 Toward the end of his life, Afonso's children and grandchildren began maneuvering for the succession, and in 1540 plotters that included Portuguese residents in the country made an unsuccessful attempt on his life.He died toward the end of 1542 or perhaps at the very beginning of 1543, leaving his son Pedro to succeed him.Although his son was soon overthrown by his grandson Diogo (in 1545) and had to take refuge in a church, the grandchildren and later descendants of three of his daughters provided many later kings.