Before this, several different kings had ruled different countries in what is now called Spain. Two of these countries, Castile and Aragon, came together when the king of Aragon, Ferdinand II, married the queen of Castile, Isabella.