 At Isabella's death the crown of Castile passed to their daughter Joanna, by the terms of their prenuptial agreement and Isabella‘s last will and testament, and Ferdinand lost his monarchical status in Castile.Joanna's husband Philip became "de jure uxoris" King of Castile, but died in 1506, and Joanna ruled in her own right.In 1504, after a war with France, he became King of Naples as Ferdinand III, reuniting Naples with Sicily permanently and for the first time since 1458.