Alfonso, Prince of Asturias was the figurehead of rebelling magnates against his half brother Henry IV of Castile.
Background
Alfonso was the only surviving son of John II of Castile, by his second wife, Isabella of Portugal, Henry IV being the product of his first marriage. After the death of his father, John II, Alfonso, his mother and sister were virtually exiled, his mother to Arevalo and the children to Segovia.
Career
Alfonso"s sister, the future Queen Isabella I of Castile, was also the product of this second marriage. When Alfonso was around seven years of age the two children were moved to Henry"s court at Madrid and were placed in Queen Joan"s household. In early 1460s, Castilian nobles became dissatisfied with the rule of King Henry IV, and believed that the child (Joanna, Princess of Asturias) that Henry"s wife Queen Joan had given birth to was not sired by Henry.
Propaganda and rumour encouraged by the league of rebellious nobles argued that her father was Beltrán de la Cueva, a royal favorite of low background who had been elevated to enormous power by Henry and who, by some, has been suggested as Henry"s lover.
This resulted in the name "Juana la Beltraneja", which has stuck with the girl throughout history. If Joanna were illegitimate, the next candidate would be Alfonso.
Considering Isabella"s impact on world history, this question has fascinated historians for centuries. The league of nobles controlling Alfonso forced Henry with the 1464 Representation of Burgos to repudiate Joanna and recognize Alfonso as his official heir.
Alfonso then became Prince of Asturias, a title previously held by Joanna.
Henry agreed to the compromise with the stipulation that Alfonso someday marry Joanna, to ensure that they both would one day receive the crown. Not long after this, Henry reneged on his promise and began to support his daughter"s claim once more. The nobles in league against him conducted a ceremonial deposition-in-effigy of Henry outside the city of Avila and crowned Alfonso as a rival king.
This event is known in history as the Farce of Avila.
Shortly thereafter, Alfonso began handing out land and titles as if he were already uncontested ruler. A civil war began. The most notable clash was at the Second Battle of Olmedo in 1467, which concluded as a draw.
However, in 1468 at the age of only 14, Alfonso died of a sickness, most likely the plague (although poison and slit throat have been suggested as alternative causes of death). Though Henry continued to resist this decision when possible, his actions were ineffective, and he remained at peace with Isabella for the rest of his reign.
Isabella became Castile"s next monarch when he died in 1474.