The documented history of Murcia traces back at least to the Middle Ages, after Madinat Mursiya was built by Andalusi Emir Abd al-Rahman II in the 9th century, while it is suggested the city was erected over a previous settlement of Roman origin.

Pre Foundation The territory has been inhabited by humans since prehistory. People also lived in the current municipality during the Bronze and Iron Ages. During the late Chalcolithic and the Bronze Age, the occupancy of part of the current municipality was performed by the Argaric people. During the late Bronze Age and the Iron Age, the people who inhabited the current municipality were the Iberians. A remarkable site is a religious building, whose name is the De la Luz Iberian Sanctuary. There are traces of people presence during the Roman rule in the Iberian Peninsula era. A construction of the late Roman period in the Iberian Peninsula is a fortress, Castillo de los Garres, located in the south of the northern half of the municipality.

It has been suggested that Murcia's name is derived from the Latin word myrtea or murtea, meaning land of the myrtle (the plant is known to grow in the general area), although it may also be a derivation of the word Murtia, which would mean Murtius Village (Murtius was a common Roman name). Other research suggests that it may owe its name to the Latin Murtae (Mulberry), which covered the regional landscape for many centuries. The Latin name eventually changed into the Arabic Mursiya, and then, Murcia.

Middle Ages

Madinat Mursiya was reportedly founded circa 825 upon the will of Umayyad Emir Abd al-Rahman II (other sources place its foundation by 831), in parallel to the destruction of neighbouring city of Eio. However, particularly on the light of the archeological evidence of earlier buildings with Christian symbology, there is an historiographical consensus on it being a re-foundation over an earlier Roman settlement tracing back to the 4th or 5th century AD.

The city prospered under the Caliphate of Córdoba but after the Caliphate was dismembered due to the Fitna of al-Andalus, the city was conquered in the 1010s by , a slav eunuch and former servant of Almanzor who soon left to Almería, placing as governor in the city. After the death of the former, the whole territory was annexed in 1038 by , ruler of Valencia.

The taifa of Murcia was conquered by Muhammad ibn Aisha on behalf of the Almoravid Empire in June 1091. As the Almoravid Empire retreated, Abu ʿAbd Allāh Muḥammad ibn Saʿd ibn Mardanīš (Rey Lobo in Christian chronicles) established a new taifa in the mid-12th century, lasting from 1147 to 1172. During his reign Ibn Mardanis allied with Castile to counter the Almohad expansion.

In 1228, Ibn Hud, an Andalusian emir, rebelled against the Almohad Empire, entering the city of Murcia on 4 August 1228, establishing a new emirate (the third Taifa of Murcia), ruled by the Banu Hud.

By 1240 the taifa was increasingly atomised, with several cities split from the nominal authority of the emir in the city of Murcia, who still claimed authority over the full jurisdiction. Before the triple military threat posed by Castile, Aragon and Granada, the Murcian Emir Muhammad al-Dawla opted to negotiate a treaty with the Castilian King Ferdinand III. After the 1243 Treaty of Alcaraz was reached, the city and the rest of the taifa became a vassal state of the Crown of Castile. Christians became a majority within the city as immigrants came from all parts of Iberia with Muslims confined to the suburb of Arrixaca.

As a progressive breach of the conditions abided in the treaty of Alcaraz ensued, discontent increased among the Muslim population, leading to a full-blown insurrection, with the rebels in Murcia joining the 1264 Múdejar revolt. After the intervention of Aragon in 1265, the rebels surrendered the city to forces commanded by Jaime I of Aragon on 2 February 1266; the city was returned to his son-in-law Alfonso X of Castile by the middle of that year. Following the quelling of the rebellion, Alfonso X granted Murcia a charter and privileges similar to those of Seville in 1266.

Alfonso de la Cerda donated the Kingdom of Murcia to Jaime II of Aragon on 21 January 1296 in exchange for help vis-à-vis his challenge for the Castilian throne. The city remained under Aragonese control for eight years, until the delivering of the city signed on 16 November 1304, in compliance with the Treaty of Torrellas. The Castilian monarchs entrusted wide competences to a senior officer called the Adelantado Mayor over the whole Kingdom of Murcia (then a borderland of the Crown of Castile, nearing Granada and Aragon). The territory was to become subject of a nobiliary struggle for the political power between the lineage of Don Juan Manuel and the Fajardo family for much of the Late Middle Ages. In 1374 seven Murcians were executed for supporting John of Gaunt's claim to the Castilian throne when his forces were drawing near to Castile during an invasion of France.

The city of Murcia suffered its first plague epidemic in 1348; reruns of the plague ensued in 1380 and 1395, with the 1395 outbreak decimating half the city population. Plague outbreaks of lesser magnitude continued to take place in the 15th century (also in the 16th century).

Early modern period In 1520, the city joined the Comunero uprising, although with very different nuances from the rest of Castile, featuring an anti-oligarchic component that was linked to the conflicts that took place in the Kingdom of Murcia at the end of the 15th century. An assembly of two thousand people took an oath against councilors and other municipal officials in the Plaza de Santa Eulalia. These officials sought military assistance from the , Pedro Fajardo y Chacón (the first Marquis of Los Vélez), who refused to provide it. Murcia's comuneros established a syndical board with some popular representation, elected by parishes,Rodríguez Llopis, pags. 222–224 participating in the from October 1520.

In 1521, work began on the main symbol of the city, the Bell tower of Murcia Cathedral (specifically its first level), under the direction of the Italian architects Francisco and . This structure is one of the signature works of the Renaissance, along with the Junterón Chapel in the same church, created by , who also worked on the second level of the tower.

At the end of 1541, Murcia received a visit from Emperor Charles V (King Charles I of Spain), returning from the disappointing campaign of Algiers. After disembarking in Cartagena, the monarch entered the medina through the Puerta de Vidrieros and prayed in the main chapel of the cathedral, before the tomb of Alfonso X. He stayed in the city for several days.

In 1555, one of the first Jesuit colleges in all of Spain was founded at the initiative of Bishop . Today, the College of San Esteban is the seat of the regional government and is known as the .Emilio Estrella Sevilla, pags. 115–117 The landscape of educational centers in the city was completed by the founding in 1592 of the , as well as the in 1599, both due to the initiative of Bishop Sancho Dávila Toledo.

During the reign of Philip II, troops from Murcia under the command of Luis Fajardo, the second Marquess of los Vélez and Adelantado of the Kingdom of Murcia, helped quell the Morisco rebellion in the Kingdom of Granada.Rodríguez Llopis, pags. 265–266 As a result, Murcia was granted the title "Very noble and very loyal."

The conflict in the Alpujarras also caused the collapse of the silk sector in Granada, which in turn led to the rise of silk production in Murcia. This allowed the city and its kingdom to avoid the late 16th-century crisis that affected Castile. In fact, the crisis would not reach Murcia until the third decade of the 17th century,Rodríguez Llopis, pags. 273 so during the early years of that century, the Contraste (Silk Exchange) was built and the Almudí - the city's grain store—was rebuilt, symbols of Murcia's thriving silk trade at the time.

According to the census of 1591, the city of Murcia had 16,000 inhabitants, making it one of the most populous cities in the Crown of Castile after Seville, Madrid, Granada, Toledo, Valladolid, Córdoba and Salamanca.Rodríguez Llopis, Atlas Histórico Ilustrado de la Región de Murcia y su antiguo reino pags. 146

In 1613, Philip III decreed the expulsion of the remaining Moriscos in Murcia, who still lived in scattered aljamas (communities) throughout the countryside and were vital to silk production.Rodríguez Llopis, pags. 276 This represented a blow to the city's economy and population.

In 1648, an epidemic of plague from Valencia was particularly virulent in Murcia, reportedly having close to a 50% mortality rate. The situation worsened in 1651 when the city was devastated by a flood of the Segura River that caused over 1,000 deaths, known as the Riada de San Calixto.Rodríguez Llopis, pags. 281 However, in 1654 the Royal Saltpeter Factory was founded by order of Philip IV to revitalize the city after these disasters, with the complex built on what was then the Calle de la Acequia (today, Calle Acisclo Díaz).Emilio Estrella Sevilla, pags. 26 The last major plague epidemic in Spain affected Murcia in 1677.

Eighteenth Century On 26 September 1701, a flood of the Segura River destroyed the bridge connecting the city to the right bank of the river, which served as the starting point of the royal road to Cartagena. After numerous delays, construction of a new bridge began in 1718. Completed in 1742, it is the oldest surviving bridge in the city, and due to this fact, it is known as the Puente Viejo.Emilio Estrella Sevilla, pp. 39–46

During this same century, Murcia experienced a cultural and artistic flourishing, most notably through the work of Francisco Salzillo, a Murcian sculptor whose religious imagery became central to the city's identity. He mainly worked through wood carvings.

The War of Succession and Cardinal Belluga

In 1705, Luis Belluga y Moncada was appointed Bishop of Cartagena, a figure who would become key not only for the city of Murcia but for the entire kingdom in the first half of the 18th century. During the War of the Spanish Succession, he was instrumental in securing the Bourbon cause in the city, confronting several pro-Austrian councillors.Rodríguez Llopis, pp. 303–304 In 1706, appointed Viceroy of Murcia and Valencia by Philip V, he organized the defense of the city against the advance of Archduke Charles in the southeast. English forces had captured Cartagena and Elche, while in nearby Orihuela, the Marquis of Rafal proclaimed the Habsburg candidate as king. With the city under siege, Belluga ordered the deliberate flooding of the Huerta (orchard areas) to prevent Murcia from being taken and organized militias that triumphed in the Battle of Huerto de las Bombas on the outskirts of Murcia. This victory secured the region of Murcia for the Bourbon cause.

After the war, the characteristic Bourbon reformism of the new dynasty was reflected in various works, such as the important Reguerón Canal, projected in 1734 by , which diverted the course of the Guadalentín River to flow into the Segura River downstream from Murcia, reducing the risk of flooding in the city.

In the second half of the 18th century, the Murcian José Moñino y Redondo, Count of Floridablanca was appointed Secretary of State by Charles III. Floridablanca notably benefited his homeland with infrastructure projects and enlightened policies.Rodríguez Llopis, p. 310

The Murcian Golden Age

During the 18th century, Murcia experienced significant economic expansion. This growth was based on agricultural development and an increase in cultivated land. The expansion of irrigation led to a greater extension of the Huerta de Murcia and dry crops in the rural areas, resulting in the formation of new human settlements, the origins of many of today's districts.Emilio Estrella Sevilla, p. 38