A brave soldier who obtained a complete victory over the King of Morocco and Grenada, near Tarifa, in 1340. Being in love with Leonora de Guzman, Alfonso XI., whose life he had saved in the battle, created him Count of Zamora and Marquis of Montreal, and gave him the hand of Leonora in marriage. No sooner was this done, than Ferdinando discovered that Leonora was the king's mistress; so he restored his ranks and honours to the king, repudiated his bride, and retired to the monastery of St. James of Compostella. Leonora entered the same monastery as a novice, obtained the forgiveness of Ferdinando, and died.
(Donizetti's opera of La Favorita.)
Source: Dictionary of Phrase and Fable, E. Cobham Brewer, 1894
More on Ferdinando from Infoplease: