Portuguese developed in the Western Iberian Peninsula from the spoken Latin language brought there by Roman soldiers and colonists starting in the 3rd century BC. The language began to differentiate itself from other Romance languages after the fall of the Roman Empire and the barbarian invasions in the 5th century. It started to be used in written documents around the 9th century, and by the 15th century it had become a mature language with a rich literature.
Arriving on the Iberian Peninsula in 218 BC, the Romans brought with them the Roman people's language, Vulgar Latin, from which all Romance languages (also known as "New Latin Languages") descend. Already in the 2nd century BC southern Lusitania was romanized. Strabo, a 1st-century Greek geographer, comments in one book of his Geographia: "they have adopted the Roman customs, and they no longer remember their own language." The language was spread by arriving Roman soldiers, settlers and merchants, who built Roman cities mostly near previous civilizations' settlements.
Between 409 A.D. and 711, as the Roman Empire was collapsing, the Iberian Peninsula was invaded by peoples of Germanic origin, known by the Romans as Barbarians. The Barbarians (mainly Suevi and Visigoths) largely absorbed the Roman culture and language of the peninsula; however, since the Roman schools and administration were closed, Europe entered the Dark Ages and communities became isolated, the popular Latin language was left free to evolve on its own and the uniformity of the Peninsula was soon disrupted, leading to the formation of the "Lusitanian Romance". From 711, with the Moorish invasion of the Peninsula, Arabic was adopted as the administrative language in the conquered regions. However, the population continued to speak their Romance dialects so that when the Moors were overthrown, the influence that they had exerted on the language was small. Its main effect was in the lexicon.Free Quote
The earliest surviving records of a distinctively Portuguese language are administrative documents from the ninth century, still interspersed with many phrases in Latin. Today this phase is known as "Proto-Portuguese" (spoken in the period between the 9th to the 12th century).
Portugal became an independent country in 1143, with King Alfonso Henriques. In the first period of "Old Portuguese" - Portuguese-Galician Period (from 12th to the 14th century), the language came gradually into general use in the following centuries, after gaining popularity in the Christian Iberian Peninsula as a language for poetry. In 1290, king Diniz created the first Portuguese University in Lisbon (the Estudo Geral) and decreed that Portuguese, then simply called the "Vulgar language" (i.e. Vulgar Latin) should be known as the "Portuguese language" and should be officially used.
In the second period of Old Portuguese, between the 14th and the 16th centuries, with the Portuguese discoveries, the Portuguese language spread to many regions of Asia, Africa and The Americas. Today most of the Portuguese speakers live in Brazil in South America. By the 16th century it had become a lingua franca in Asia and Africa, used not only for colonial administration and trade but also for communication between local officials and Europeans of all nationalities. The spread of the language was helped by mixed marriages between Portuguese and local people (also very common in other areas of the world) and its association with the Catholic missionary efforts, which led to its being called Cristão ("Christian") in many places in Asia. The language continued to be popular there until the 19th century.
Some Portuguese-speaking Christian communities in India, Sri Lanka, Malaysia and Indonesia preserved their language even after they were isolated from Portugal. The language has largely changed in these communities and has evolved through the centuries into several Portuguese creoles; some still exist today, after hundreds of years in isolation. Also, a considerable number of words of Portuguese origin are found in Tetum. Portuguese words entered the lexicons of many other languages, such as Japanese, Indonesian, Malay, or Swahili.
The end of "Old Portuguese" was marked by the publication of the Cancioneiro Geral de Garcia de Resende, in 1516. The period of "Modern Portuguese" (from the 16th century to the present) saw an increase in the number of words of Classical Latin origin and erudite words of Greek origin borrowed into Portuguese during the Renaissance, which augmented the complexity of the language.