El Boqueron, I think that I was the one who posted it
Anyway, since this is a fascinating topic, and I have finished my exams, I will write it again.
All what I'm going to write is the way I think it is, the way I have been taught, and the way I have readen it was. It could be more or less accurate.
The Iberian Peninsula was populated by different realms and cultures before it was colonized by ancient civilizations.
The natives were the Celts (which had their influence more strongly in the north of the Peninsula, and also in Ireland), the Ibers (I mean íberos) which were even native or paneuropeans, and Tartessos (a extinct culture which is said to be settled somewhere in the south, perhaps in the Cadiz province). All these cultures merged with years into a "common" one called celtibers (celtíberos).
Then we had migratory fluxes coming to the Peninsula, with phoenicians (fenicios), greeks and cartagonians (is that the word? I mean cartagineses) founding sea-ports along all the mediterranean coasts of the Peninsula. From that times we still have some towns: Cádiz (which was given various names by the phoenicians, the greeks and the cartagineses, Gadir, Gadis, Gador, ...), Cartagena (Cartago Nova), Sagunto, etc
The cartagineses and Anibal had conquered and colonized the southeastern half of the Peninsula, but they were a threat to the romans, who decided to conquer the Peninsula. They called it Hispania, or hispanic provinces, and divided it into different subprovinces (whose borders changed at the same time the Roman Empire did): Lusitania, Tarraconensis and Betica.
The romans left here countless cities, monuments, and a precious treasure: the common lathyn. Hispania also gave to the empire some emperors, as Trajano and Adriano.
Some cities founded by the romans are: Tarragona (Tarraco), Barcelona (Barcino), Zaragoza (Caesar Augusta), Ciudad Rodrigo (Mirobriga), Mérida (Emérita Augusta), Sevilla (Hispalis),...
At the fifth century a.C. the Roman Empire was overrun by the goths, which were germanic tribes with much less culture than the romans. The Peninsula received migratory fluxes of theses tribes: Suevos (Northwest), Alanos, Vándalos, Bereberes and Visigoths (which were the most numerous). The common lathyn evolved acquiring germanic words (guerra, bizarro, brigada,...). The visigoths, as the previous cultures, mixed with the natives.
Then the arabs came (in 711 a.C.), and conquered almost all the Peninsula, except for the northern regions (Asturias, Cantabria, País Vasco). Keep in mind that the arabs were only about 100000, and the natives were a handful millions. But the arabs culture was superior than the one of the natives, and thus, Spain was arabized. The common lathyng evolved taking lots of words from the arab (words like alguacil, almohada, agua, acequia,...).
For some centuries the arabs remained here, but were defeated by CarloMagno in Poitiers, so they didn't cross the Pyrenees. Some other muslims came to the Peninsula: sudaneses, northafricans,...
The it started "La Reconquista", and the birth of modern spanish languages. The unconquered north natives started to push south the arabs. From west to east these were the kingdoms that existed:
Astures, Leoneses, Castellanos (which were firstly a basque county between the current Cantabria and País Basco), navarros, aragoneses y catalanes (which were aragonese counties, but I include them because they kept their language).
All these kingdoms had their own language, evolved from the common lathyn, and thus similiar to the others. The basques conserved their own non-lathyn language. It is said they did it because, as mountaineous as it is the Basque Country, the romans couldn't influence them, or didn't conquered them at all. What it seems true is that the basque come from some place in what is today the Caucasus.
The christian kingdoms begun to conquer the arab caliphate of Cordoba. For centuries, the christian kingdoms continued to conquer de south territories, and the languages evolved. At the west, the gallego-portuges remained as a language, but the astur and the leonese merged in one language. Then it was the castellano in the center, and in the east the navarro and the aragonese also merged. Catalonian remained also as a language, spreading through Valencia and the Balearic Islands.
In 1492 there were only 4 realms remaining: Portugal (which was formed from a castlilian county) with its own language, the castilian language had merged, overrun its side-languages: the astur-leones, and the navarro-aragones, the Castilian Kingdom had also merged with these realms. The Aragon Kingdom remained with the aragonese and the catalonian as its languages.
In the same year lots of important things happend:
The "Catholic Kings" Isabel from Castilla and Fernando from Aragon had married and signed an alliance.
Colon discovered America, which was left to colonize for castlilian natives (that is the reason the castilian is spoken there, and not the aragonese-catalonian), the aragoneses colonized Cerdeña, Sicilia and Napoles (they were given in exclusivity the Mediterranean).
In 1493 Navarra was anexioned by force by the Castilian Kingdom.
In 1492 the last moslem kingdom (Granada) was conquered by united forces of castilians and aragoneses.
In 1492 the spanish jews were made to abandon Spain. They still conserve their own arcaic castilian, called sefardí.
In 1493 the spanish moslems were made to abandon Spain.
Spain gained religious unity by loosing her best agricultors and comerciants.
In 1492 the Canarian Islands were colinized, then in 1493 the cities of Ceuta and Melilla were founded, and other forts were occupied (Orán, Tanger, Túnez,...).
The realms united when Carlos I inherited them. He was the most powerful king ever, being king of Catilla, Aragón, Navarra, Napoles y las Dos Sicilias, Netherlands and all the american territories, Philipines and the Germanic Empire.
His son Felipe II also inherited the throne of Portugal.
All these realms had their influence in the spanish languages.
In the last centuries other cultures influenced the remaining languages (french, english, native american-indians, italian,...).
And that is the history. Now you now why in Galicia the galego is spoken, why in Portugal the portuguese is spoken, why the bable (a castilian dialect with most conexions with the ancient astur-leonés), the basque, the castilian and all its dialects, the catalonian and all its dialects, and every local dialect all around Spain
I'm really proud of this richness, and all the influences the spanish languages have had throught their history.
Fernando