The origins of Murcia date back to 825. At that time, the city was known as Medinat Mursiya and was subject to the Arab emirate. The Arabs used the current of the Segura River to build a complicated network of irrigation channels that contributed to the development and enrichment of the city. After the fall of the Caliphate of Cordoba in 1031, Murcia came under the rule of Almeria, Toledo and Seville, and in the years 1223-1243 it was even the capital of an independent kingdom. At that time, Murcia was a very wealthy city, known for its ceramics, exported to Italian cities, as well as the silk and paper industry, the first in Europe. Under the Treaty of Alcaraz in 1243, Christian King Ferdinand III of Castile made Murcia a protectorate by entering the Mediterranean, and Murcia was protected from Granada and Aragon. The city's Christian population has become a majority because immigrants have poured out of almost all parts of the Iberian Peninsula. Christian immigration has been encouraged to establish a loyal Christian base. These measures led to a revolt in the Muslim population in 1264, which in 1266 was suspended by Jacob I of Aragon, bringing Aragon and Catalan immigrants to him. After that, during the reign of Alfonso X Castile, Murcia was one of its capital of Toledo and Seville. In 1304, Murcia was finally incorporated into Castile under the Torrellas Treaty. The Christian population of the town became the majority as immigrants poured in from almost all parts of the Iberian Peninsula. Christian immigration was encouraged with the goal of establishing a loyal Christian base. These measures led to the Muslim popular revolt in 1264, which was quelled by James I of Aragon in 1266, conquering Murcia and bringing Aragonese and Catalan immigrants with him. After this, during the reign of Alfonso X Castile, Murcia was one of its capital of Toledo and Seville. In 1304, Murcia was finally incorporated into Castile under the Torrellas Treaty.
Murcia's prosperity declined as the Mediterranean lost trade to the ocean routes and from the wars between the Christians and the Ottoman Empire. The old prosperity of Murcia became crises during 14th century because of its border location with the neighbouring Muslim kingdom of Granada, but flourished after its conquest in 1492 and again in the 18th century, benefiting greatly from a boom in the silk industry. Most of the modern city's landmark churches, monuments and old architecture date from this period. In this century, Murcia lived an important role in Bourbon victory in the War of the Spanish Succession, thanks to Cardinal Belluga. In 1810, Murcia was looted by Napoleonic troops.
It then suffered a major earthquake in 1829. According to contemporaneous accounts, an estimated 6,000 people died from the disaster's effects across the province. Plague and cholera followed. The town and surrounding area suffered badly from floods in 1651, 1879, and 1907, though the construction of a levee helped to stave off the repeated floods from the Segura. A popular pedestrian walkway, the Malecon, runs along the top of the levee.
Murcia has been the capital of the province of Murcia since 1833 and, with its creation by the central government in 1982, capital of the autonomous community (which includes only the city and the province). Since then, it has become the seventh most populated municipality in Spain, and a thriving services city. An earthquake in the Mediterranean and Serbia caused the Murcia region to shake with a maximum intensity of seven on the Richter scale on May 11, 2011. Eight people were killed and over 400 were injured.