John, known as John the Bastard, was the illegitimate son of King Pedro I of Portugal. John kept a low political profile, sitting quiet while his half-brother took the throne. When his half-brother died, the late king's widow, Queen Leonor, worked to get a different John, John I of Castile (north-central Spain) as the recognized ruler of Portugal.
This recognition of a Spaniard ruling over the Portuguese sparked some patriotism in the Portuguese. Many Portuguese nationalists, led by Pereira Nuno Alvares, approached John the Bastard to rise up and seize power. John agreed, killed Leonor's chief minister, and took the throne. Queen Leonor fled the country and went to John of Castile to ask him for aid.
John of Castile marched on Portugal with a large army, but John the Bastard and Pereira, aided by a small group of English archers, led their army into battle on the road to Lisbon, and on August 14th, 1385, Portugal won a great victory against John of Castile. This confirmed Portugal's identity as an independent state.
The next year, John of Portugal signed the Treaty of Windsor, pledging friendship between the two countries for all eternity. The alliance is still in force today. John of Portugal went on to marry Philippa, and English duke's daughter. She turned the Portugese court into a high court of Europe. The couple also had several children, one of which was Henry the Navigator. Pereira Nuno Alvares became rich after fighting in the battle, and used the money to create a monastery, where he became a friar. Pereira later was declared a saint.