Spanish literature is literature (Spanish poetry, prose, and drama) written in the Spanish language within the territory that presently constitutes the Kingdom of Spain. Its development coincides and frequently intersects with that of other literary traditions from regions within the same territory, particularly Catalan literature, Galician intersects as well with Latin, Jewish, and Arabic literary traditions of the Iberian Peninsula. The literature of Spanish America is an important branch of Spanish literature, with its own particular characteristics dating back to the earliest years of Spain’s conquest of the Americas (see Latin American literature).

Overview The Roman conquest and occupation of the Iberian Peninsula beginning in the 3rd century BC brought a Latin culture to Spanish territories. The Muslim conquest in 711 CE brought the cultures of West Asia and the North Africa to the peninsula, creating Andalusi literary traditions. In medieval Spanish literature, the earliest recorded examples of a vernacular Romance-based literature mix Muslim, Jewish, and Christian culture. One of the notable works is the epic poem Cantar de Mio Cid, composed some time between 1140 and 1207. Spanish prose gained popularity in the mid-thirteenth century. Lyric poetry in the Middle Ages includes popular poems and the courtly poetry of the nobles. During the 15th century the pre-Renaissance occurred and literary production increased greatly. In the Renaissance important topics were poetry, religious literature, and prose.

In the 16th century the first Spanish novels appeared, Lazarillo de Tormes and Guzmán de Alfarache. In the Baroque era of the 17th century important works were the prose of Francisco de Quevedo and Baltasar Gracián. A notable author was Miguel de Cervantes Saavedra, famous for his masterpiece Don Quixote de la Mancha. In this novel Cervantes consolidated the form of literature that the picaresque novel had established in Spain to a fictional narrative that became the template for many novelists throughout the history of Spanish literature.J.A. Garrido Ardila "A Concise Introduction to the History of the Spanish Novel" A History of the Spanish Novel, Oxford University Press 2015

In the Enlightenment era of the 18th century, notable works include the prose of Feijoo, Jovellanos, and Cadalso; the lyric of Juan Meléndez Valdés, Tomás de Iriarte and Félix María Samaniego), and the theater, with Leandro Fernández de Moratín, Ramón de la Cruz, and Vicente García de la Huerta. In Romanticism (beginning of the 19th century) important topics are: the poetry of José de Espronceda and other poets; prose; the theater, with Ángel de Saavedra (Duke of Rivas), José Zorrilla, and other authors. In Realism (end of the 19th century), which is mixed with Naturalism, important topics are the novel, with Juan Valera, José María de Pereda, Benito Pérez Galdós, Emilia Pardo Bazán, Leopoldo Alas (Clarín), Armando Palacio Valdés, and Vicente Blasco Ibáñez; poetry, with Ramón de Campoamor, Gaspar Núñez de Arce, and other poets; the theater, with José Echegaray, Manuel Tamayo y Baus, and other dramatists; and the literary critics, emphasizing Menéndez Pelayo.

In Modernism several currents appear: Parnasianism, Symbolism, Futurism, and Creationism. The destruction of Spain's fleet in Cuba by the U.S. in 1898 provoked a crisis in Spain. A group of younger writers, among them Miguel de Unamuno, Pío Baroja, and José Martínez Ruiz (Azorín), made changes to literature's form and content. By the year 1914—the year of the outbreak of the First World War and of the publication of the first major work of the generation's leading voice, José Ortega y Gasset—a number of slightly younger writers had established their own place within the Spanish cultural field. Leading voices include the poet Juan Ramón Jiménez, the academics and essayists Ramón Menéndez Pidal, Gregorio Marañón, Manuel Azaña, Eugenio d'Ors, and Ortega y Gasset, and the novelists Gabriel Miró, Ramón Pérez de Ayala, and Ramón Gómez de la Serna. Around 1920 a younger group of writers—mostly poets—began publishing works that from their beginnings revealed the extent to which younger artists were absorbing the literary experimentation of the writers of 1898 and 1914. Poets were closely tied to formal academia. Novelists such as Benjamín Jarnés, Rosa Chacel, Francisco Ayala, and Ramón J. Sender were equally experimental and academic.

The Spanish Civil War had a devastating impact on Spanish writing. Among the handful of civil war poets and writers, Miguel Hernández stands out. During the early dictatorship (1939–1955), literature followed dictator Francisco Franco's reactionary vision of a second, Catholic Spanish golden age. By the mid-1950s, just as with the novel, a new generation which had only experienced the Spanish Civil War in childhood was coming of age. By the early 1960s, Spanish authors moved towards a restless literary experimentation. When Franco died in 1975, the important work of establishing democracy had an immediate impact on Spanish letters. Over the next several years a wealth of young new writers, among them Juan José Millás, Rosa Montero, Javier Marías, Luis Mateo Díez, José María Merino, Félix de Azúa, Cristina Fernández Cubas, Enrique Vila-Matas, Carme Riera, and later Antonio Muñoz Molina and Almudena Grandes, would begin carving out a prominent place for themselves within the Spanish cultural field.

Pre-medieval literature The Roman conquest and occupation of the peninsula, spanning from the 3rd century BCE to the 5h century CE, brought a fully developed Latin culture to Spanish territories. While the invasion of Germanic tribes in the fifth century CE put an end to Roman Spain, the tribes’ relative lack of advanced culture, including any kind of literary tradition, meant that any written literature produced in the Iberian Peninsula continued along Romanized lines. Outstanding amongst the works produced is Saint Isidore of Seville’s () Etymologiae, an attempted summa of all classical knowledge. Called “the last scholar of the ancient world", St. Isidore penned theological and proto-scientific treatises, letters, and a series of histories that would serve as models for the rest of Western Europe throughout the Middle Ages.

The arrival of Muslim invaders in 711 CE brought the cultures of the Middle and Far East to the Iberian Peninsula and ultimately to all of Europe. During the era of relative religious tolerance that followed, writers such as the Jewish theologian Maimonides (1138–1204) or the Muslim polymath (1126–1198) Averroes penned works of theology, science, philosophy, and mathematics that would have lasting impacts on Hebrew and Muslim philosophy and prove essential to the flowering of the European Renaissance centuries later. While none of their works can be considered direct ancestors of a Spanish literary tradition, it was out of the cultural milieu fostered by such intellectual energy that the first written manifestations of a Spanish literature proper arise.

Medieval Spanish literature

Andalusi literature

The period of Islamic rule in Iberia from 711 to 1492 brought many new literary traditions to Spain. Most literature at this time was produced in standard Arabic, though poetry and other forms of literature of the Jewish golden age found expression in Judeo-Arabic or Hebrew. Maimonides, for example, wrote his magnum opus The Guide for the Perplexed in Arabic with Hebrew script.

Other major literary figures of the time include Ibn Arabi, Al-Mu'tamid ibn Abbad, Ibn al-Khatib, Ibn Zaydún and Hafsa Bint al-Hajj al-Rukuniyya.

Important literary styles include the muwashah, maqama, and nawba.

Important works include Al-ʿIqd al-Farīd, Hayy ibn Yaqdhan, The Incoherence of the Incoherence, and Hadith Bayad wa Riyad.

The kharjas

The earliest recorded examples of a vernacular Romance-based literature date from the same time and location, the rich mix of Muslim, Jewish, and Christian cultures in Muslim Spain, in which Maimonides, Averroes, and others worked. The Jarchas, dating from the 9th to the 12th centuries C.E., were short poems spoken in local colloquial Hispano-Romance dialects, known as Mozarabic, but written in Arabic script. The Jarchas appeared at the end of longer poetry written in Arabic or Hebrew known as muwashshah, which were lengthy glosses on the ideas expressed in the jarchas. Typically spoken in the voice of a woman, the jarchas express the anxieties of love, particularly of its loss.

This combination of Hispano-Romance expression with Arabic script, only discovered in 1948, locates the rise of a Spanish literary tradition in the cultural heterogeneity that characterized Medieval Spanish society and politics. However, the Mozarabic language of the Jarchas appears to be a separate Romance language whose evolution from Vulgar Latin paralleled that of Castilian Spanish rather than deriving from or fusing into the latter. Hence, while the relatively recent discovery of the Jarchas challenges the pride of chronological place that belonged for so long to the Poema del Cid (El Cantar de mío Cid) (1140 CE) in the history of Spanish literature, they cannot be seen as a precursor to Spain's great epic poem. What the discovery of the jarchas makes clear instead is that from its origins, the literature of Spain has arisen out of and borne witness to a rich, heterogeneous mix of cultures and languages.Linda Fish Compton: Review of Andalusian Lyrical Poetry and Old Spanish Love Songs: The "Muwashshah" and Its "Kharja." by S. G. Armistead", Hispanic Review, Vol. 46, No. 1. (Winter, 1978), pp. 92-95 : "The use of Mozarabic should not be limited to "Christians and Jews living under Muslim rulers", since it is clear that most Hispano-Moslems also spoke [it]"LIPSKI, John M.: "Review of El Mozarabe de Valencia by Leopoldo Penarroja Torrejon", International Journal of Middle East Studies.Vol. 24, No. 3 (Aug., 1992), pp. 519-521 CASTRO, Américo: "Mozarabic Poetry and Castile", Comparative Literature. Vol. 4, No. 2 (Spring, 1952), pp. 188-189.: "[...] The new-found Mozarabic poetry is not written in Castilian, and that therefore its existence cannot be used to prove that there was a lyric poetry in Castile"

Cantar de Mio Cid

The epic poem Cantar de Mio Cid was written about a real man—his battles, conquests, and daily life. The poet, name unknown, wrote the epic in about 1140 and Cid supposedly died forty years before in 1099. This epic represents realism, because nothing was exaggerated and the details are very real, even the geography correctly portrays the areas in which Cid traveled and lived. Unlike other European epics, the poem is not idealized and there is no presence of supernatural beings. It has assonance instead of rhyme and its lines vary in length, the most common length being fourteen syllables. This type of verse is known as mester de juglaria (verse form of the minstrels). The epic is divided into three parts, also known as cantos.

Mester de Juglaría

Medieval Spanish poets recognized the Mester de Juglaría as a literary form written by the minstrels (juglares) and composed of varying line length and use of assonance instead of rhyme. These poems were sung to uneducated audiences, nobles and peasants alike.

Mester de Clerecía

This Castilian narrative poetry known as the Mester de Clerecía became popular in the thirteenth century. It is the verse form of the learned poets, usually clerics (hence the name 'clerecía'). The poetry was formal, with carefully counted syllables in each line. Popular themes were Christian legends, lives of saints and tales from classical antiquity. The poems were recited to villagers in public plazas. Two traits separate this form from the mester de juglaría: didacticism and erudition. Gonzalo de Berceo was one of the greatest advocates of this school, writing on religious subjects.

Spanish prose