Catalan Revolt The Catalan Revolt ( , , ; meaning in English " Reapers ' War " ) affected a large part of the Principality of Catalonia between the years of 1640 and 1659 . It had an enduring effect in the Treaty of the Pyrenees ( 1659 ) , which ceded the County of Roussillon and the northern half of the County of Cerdanya to France ( see French Cerdagne ) , thereby splitting these northern Catalan territories off from the Crown of Aragon and Spain . Background . The war had its roots in the discomfort generated in Catalan society by the presence of Castilian troops during the wars between France and Spain as part of the Thirty Years ' War . Count - Duke Olivares , the chief minister of Philip IV , had been overusing Catalan resources in his wars against France . Catalan peasants , who were forced to quarter Castilian troops , responded on Corpus Christi day , May 1640 , with an uprising known as ' Bloody Corpus ' ( Catalan " Corpus de Sang " ) , under the slogans " Long live the faith of Christ ! " , " Long live the king , our lord " , " Long live the land , death to bad government " . This ' Bloody Corpus ' which began with the death of a " segador " , a reaper , and led to the somewhat mysterious death of Dalmau de Queralt , Count of Santa Coloma and Spanish viceroy of Catalonia , marked the beginning of the conflict . The irregular militia involved were known as ' Miquelets ' . The situation took Olivares by surprise , with most of the Spanish army fighting on other fronts far from Catalonia . Pau Claris , head of the Generalitat of Catalonia , turned the social unrest of the Catalans into a political cause and proclaimed a Catalan Republic . Conflict . In a first reaction , Spain sent a large army of 26 , 000 men under Pedro Fajardo to crush the Catalan Revolt . On its way to Barcelona , the Spanish army retook several cities , executing many hundreds of prisoners . These atrocities only reinforced the determination of the defenders of Barcelona , and the Generalitat obtained an important military victory over the Spanish army in the Battle of Montjuïc ( January 26 , 1641 ) . A little later , the death of Pau Claris created a difficult local and international situation , which resulted in the proclamation of Louis XIII of France as sovereign count of Barcelona as Lluís I de Barcelona . For the next decade the Catalans and French fought as allies , taking the initiative after Montjuic . A French - Catalan army under Philippe de La Mothe - Houdancourt moved south and gained several victories . But the sieges of Tarragona , Lleida and Tortosa finally failed and the allies had to withdraw . In the north ( Roussillon ) , they were more successful . Perpignan was taken after a siege of 10 months , and the whole of Roussillon was under French control . Shortly after , Spanish relief armies were defeated at the Battle of Montmeló and Battle of Barcelona . In 1652 a Spanish offensive captured Barcelona bringing the Catalan capital under Spanish control again . Irregular resistance continued for several years afterwards and some fighting took place north of the Pyrenees but the mountains became the effective border between Spanish and French areas . Resolution . The conflict extended beyond the Peace of Westphalia , which concluded the Thirty Years ' War in 1648 but remained part of the Franco - Spanish War ( 1635 - 1659 ) with the confrontation between two sovereigns and two Generalitats , one based in Barcelona , under the control of Spain and the other in Perpinyà ( Perpignan ) , under the occupation of France . In 1652 the French authorities renounced Catalonia , but held control of Roussillon , thereby leading to the signing of the Treaty of the Pyrenees in 1659 .