The cotton industry was the first and leading industry of Catalan industrialisation that led by the mid-19th century to Catalonia becoming the main industrial region of Spain. It is the one Mediterranean exception to the tendency for early industrialisation to be concentrated in northern Europe. The Catalan cotton industry, in common with many European countries and the United States, was the first large-scale application of modern technology and the factory system.

The origins of this industry can be traced back to the early 18th century when it began producing printed cloth chintz, known as indianes locally. This was driven by government bans on imported chintz from India and the opening of trading opportunities with Spain's American colonies to Catalan merchants. Initially, spinning was not a significant part of this industry, but it gained momentum in the early 19th century with the introduction of British spinning technology. Industrialisation occurred in the 1830s after adoption of the factory system, and the removal of restrictions by Britain on the emigration of expert labour (1825) and of machinery (1842). Steam power was introduced, but the cost of imported coal and steam engines, led to a shift towards the use of water power from the late 1860s. Government policy saw the proliferation of more than 75 industrial colonies () on the rivers of rural Catalonia seeking water power, cheaper labour and land.

From the mid-19th century the industry was increasingly protected as the costs of raw cotton, energy & machinery in Spain made it difficult to compete globally. The industry came to rely almost entirely on the internal market and the remaining American colonies of Cuba and Puerto Rico. From the Great Depression, the industry declined. There was increasing strife in Spain, a declining economy, civil war and then from 1939, the policy of autarky locked the industry out of the post World War II global growth and investment. The opening of the Spanish economy in the 1960s, social changes that caused the industrial colony system to collapse and the oil shock of the 1970s saw the effective end of the industry.

The industry left a legacy of extraordinary architecture. The cotton magnates encouraged and funded the best modernisme architectural achievements, whether they were factories, private residences or apartment buildings. Often the buildings served as both the company headquarters and symbols of the owner's power, modernity and progressive spirit. They include Casa Batllo, Casa Calvet, Casa Terradas, Casa Burés, Palau Güell and the Church of Colònia Güell which is inscribed on the list of UNESCO world heritage. In addition there are outstanding factory buildings including Fàbrica Casaramona, Can Batlló (today called L'Escola Industrial), and the Aymerich factory in Terrassa which now houses the National Museum of Science and Industry.

The industrial colonies modernised and industrialised rural Catalonia and their infrastructure houses many modern museums. Many of the turbines installed in the (now closed) colonies, continue to supply electricity to the national grid. The colonies were also a powerful magnet attracting labour and spurring territorial population redistribution across the country, with implications for the politics of today.

History 1650–1736 The chintz revolution

The first chintz or calicoes ( arrived in Barcelona about 1650 possibly as European re-export from Marseille, then Europe's principle route to India. The arrival of calicoes in Europe was nothing short of a revolution in garments due to increased comfort, hygiene, lower cost and irresistible colours relative to existing silk and woolen garments. Imports increased rapidly.

Spain, like England and France, banned calico imports. Firstly in 1717, Asian textiles were banned, probably as a result of complaints from Cádiz & Seville merchants about the Philippines ruining their own re-export business to Mexico. Then in 1728, a second edict banned the import of European made imitations of Asian textiles. However the edict also explicitly allowed spun yarn from Malta and granted freedom from guild regulation of printing, thereby revealing the objective of the edict, which was to encourage a local, import-substituting weaving and printing industry in imitation of England. Although there was no direct investment from the Spanish Crown unlike for wool, favouring an industry in this way was unique in Europe and an important factor in the Catalan cotton industry's rapid growth and eventual size.

1736–1783 Chintz printing

The first printing in Barcelona, using the technique of wooden moulds or stamps, was on linen and occurred about 1736. In the early 18th century, linen cloth had begun to be imported from Amsterdam in exchange for brandy. As demand for brandy and wine to Northern Europe grew, this international trade provided the basis for the entire transformation of the Catalan economy and the textile industry in particular. Firstly, as viticulture became more specialised and profitable, the ensuing prosperity led to increasing demand for manufactured goods like printed cloth. Secondly, viticulture generated excess capital that could be invested in ship construction and increasing trade, importantly to the American colonies, in printing ventures (and later, as described in the next section, in machinery). This trade expanded through initiatives such as the Royal Barcelona Trading Company to the Indies and rapidly expanded in the last quarter of the 18th century after the ending of the Cádiz monopoly on trade with the Americas. Wine and brandy and increasingly printed cloth were exported and the return trade imported products that were inputs into the textile industry such as indigo and brazilwood amongst others Catalan merchants also invested heavily in the illicit slave trade to Cuba for "some decades" after 1814.

The protofactories were established by entrepreneurial merchants, shopkeepers or artisans who saw the booming market for chintz. Printing grew rapidly, stimulated by the period of rising population growth and prosperity in the second half of the 18th century that Spain enjoyed. Manufacturing took place in workshops that were built in the ground floors of buildings inside Barcelona's medieval walls in the Sant Pere neighbourhood where dying of cloth had been a traditional craft. Printing remained concentrated in Barcelona due to the existence of artisans of the medieval textile guilds which provided a workforce with appropriate skills, once they had learnt the techniques from immigrants from Marseilles, Hamburg and Switzerland. Training in engraving and drawing provided by the Escola de Belles Arts founded by the Royal Barcelona Board of Trade in 1775 was crucial for industry growth. The number of such printing shops rose from 8 in 1750 to 41 in 1770 to more than 100 in 1786, more than any other city in Europe. In Mataró, by the end of the 1740s there were 11 businesses and approximately 470 looms and a total labour force of 1300. This initial focus on printing can be contrasted with England, which, having banned pure cotton textiles but not the import of raw cotton, found its success in spinning and weaving (of linen/cotton mix).

1783–1832 Proto-industry

This period is termed pre-industrial or proto-industrial because it is characterised by a gradual expansion in spinning and weaving through putting-out throughout Catalonia and included from around 1790 the first steps in introducing machinery which had been invented in England. Once introduced, the technology was widely and quickly adopted by small domestic workshops in cottages throughout the traditional textile areas of central Catalonia and the Pyrenean foothills.

The loss of maritime security as a result of wars between 1796 and 1825 severely dislocated colonial trade. These were the wars against Britain, the French occupation and the Spanish American wars of independence. Limited to the internal Spanish market, the cotton entrepreneurs opted for technological change through the adoption of British mechanical spinning machines to reduce costs and gain market share with respect other cloth manufacturing.

Although cotton spinning and weaving dates from the 1760s, it used traditional hand methods and did not really qualify as an industry until the 1790s. At the time most yarn arrived from Malta (made of Egyptian or Turkish cotton), but the British capture of Malta led to an 1802 royal edict banning the import of spun yarn, which forced the industry to become self-sufficient in spinning. Simultaneously. the growth in printing drove demand for spun yarn, which drove up wages and in turn drove adoption of spinning technology. From about 1806, the adoption of the more advanced British spinning mule was facilitated by the Treaty of Fontainebleu. which made it easy to purchase French copies of this technology.

Automation of the various processes can be seen from the dates of technology arriving in Catalonia. The first spinning jenny arrived in 1785 (21 years after its invention), the first water frame in 1793 (24 years after its invention) and the first spinning mule in 1806 (27 years after its invention). By 1820, the manufacture of cotton prints had only just returned to the 1792 level but now used local cotton yarn. By 1815. there were a total of 40 mules and jennies and by 1829 there were 410 mules and 30 jennies in Barcelona.

Unlike printing, which was centred in Barcelona, spinning spread to other parts of Catalonia, partly by the need for water power. Igualada became the most important spinning centre after Barcelona, followed by Manresa, which had 11 water-driven spinning mills by 1831. Weaving became even more widespread than spinning with concentrations (in descending order of importance) in Mataró, Berga, Igualada, Reus, Vic, Manresa, Terrassa and Valls. However, weaving was slower to mechanise, and by 1861, only 44% were mechanical. Printing also advanced in this period, with the cylindrical printing process being introduced in 1817.

The wars also interrupted the brandy trade with Northern Europe, and combined with the rise of competition in the production of spirits (whisky from Scotland, vodka from Russia), merchants instead developed a new market in brandy and wine to the United States, which encouraged raw cotton as a return trade. Still highly profitable, this trade provided the capital to purchase spinning and weaving machinery and later, the first steam engines. The new machinery increased demand for raw cotton. At the end of the 1830s the volume imported quadrupled (with respect to 1804) to about 5 million kilograms, principally from the United States and Brazil.

1832–1861 The great leap

The industrial era really began in 1833 with the installation of the first steam engine in Spain at the new Bonaplata Factory (also called El Vapor) made possible by the removal of restrictions by Britain on the emigration of expert labour in 1825. Contemporary writers termed the event as an industrial revolution, as it also used machines made of cast iron for the first time. The company was formed by men from three main sectors of the industry: import and manufacture of machinery (Josep Bonaplata i Corriol made extensive visits to England), printing (Rull) and spinning and weaving (Vilaregut).

The Spanish government agreed to support the company. The factory received a subsidy, the banning of all cotton imports and the right to import some materials and equipment duty-free. In return, the company promised to manufacture power looms and spinning machines for local purchase and to grant free access to any manufacturer wanting to learn the steam technology, essentially a technology transfer to the rest of the kingdom.