His maternal grandparents were Louis IX of France and Marguerite of Provence.
In 1282 their uncle, Sancho assembled a coalition of nobles to declare for him against Fernando's elder brother, then took control of the kingdom when Alfonso X of Castile died in 1284.
Sancho was recognised and supported by the majority of the nobility and the cities, but a sizable minority opposed him throughout his reign and worked for Alfonso and Fernando.
One of the leaders of the opposition was Don Juan, his uncle, who united to his cause the lord of Vizcaya, Lope Díaz III de Haro.
Sancho responded by executing the lord of Vizcaya and incarcerating his uncle.