I n February 2017, a tide of blue flags flowed through the old Gothic centre of Barcelona towards its Mediterranean coast.

Carried by a crowd at least 160,000 strong, they were coloured to symbolise the sea, which was claiming the lives of thousands of Syrian and North African refugees trying to make it to Europe.

United behind a banner proudly proclaiming “We want to welcome you”, it was one of the biggest pro-immigration marches the world has seen.

Many taking part were outraged that Spain had pledged to accept 17,000 refugees as the crisis peaked, yet by that point, the conservative government in Madrid had only taken in a little more than 700 – and only a third of the 1,250 places provisioned for Catalonia had been filled.

“The social impact of the protest was incalculable,” recalls rally organiser Ruben Wagensberg in an interview with The Independent. He is now a member for the Republican Left of Catalonia in the regional parliament.

Strikers light fires and clash with police in Catalonia Show all 11 1 /11 Strikers light fires and clash with police in Catalonia Strikers light fires and clash with police in Catalonia Police officers work to remove burning tires that were placed in the road by demonstrators during Catalonia's General Strike AP Strikers light fires and clash with police in Catalonia Police officers work to remove burning tires that were placed in the road by demonstrators during Catalonia's General Strike AP Strikers light fires and clash with police in Catalonia Police officers remove demonstrators who are blocking a road in Barcelona during Catalonia's General Strike AP Strikers light fires and clash with police in Catalonia Police officers remove demonstrators who are blocking a road in Barcelona during Catalonia's General Strike AP Strikers light fires and clash with police in Catalonia Police officers remove demonstrators who are blocking a road in Barcelona during Catalonia's General Strike AP Strikers light fires and clash with police in Catalonia Graffiti reads 'February 21st National Strike' during the Catalan general strike EPA Strikers light fires and clash with police in Catalonia Police officers remove demonstrators who are blocking a road in Barcelona during Catalonia's General Strike AP Strikers light fires and clash with police in Catalonia Police officers remove demonstrators who are blocking a road in Barcelona during Catalonia's General Strike AP Strikers light fires and clash with police in Catalonia Police officers remove demonstrators who are blocking a road in Barcelona during Catalonia's General Strike AP Strikers light fires and clash with police in Catalonia Police officers remove demonstrators who are blocking a road in Barcelona during Catalonia's General Strike AP Strikers light fires and clash with police in Catalonia Police officers work to remove burning tires that were placed in the road by demonstrators during Catalonia's General Strike Reuters

“Now, unfortunately, our progress is being jeopardised by opportunistic far-right parties and, for the first time in Catalonia, grassroots racism,” he adds.

Two years on, almost to the day, Catalonia is seeing a very different “protest” – in one week alone, there have been three attacks on immigrants.

Near where the sea meets the mountains in Catalonia’s Castelldefels, around 25 young Spaniards, wearing hoods and with their faces covered, broke into a shelter where 35 unaccompanied foreign minors were living and attacked the children with rocks “bigger than their heads”.

“You can’t begin to imagine the fight, and everyone who experienced it is still processing it. Minutes felt like hours,” one of the staff members on duty told local news agencies.

More than a dozen residents were apparently beaten and mugged, but fortunately, the security guards and care workers on duty managed to protect the children from more serious injuries. One of the workers, however, had to be rushed to hospital.

One boy was treated for anxiety after he was found in a back room, apparently kidnapped by five of the intruders.

Once word got out, despite mass condemnation, there appeared to be a splinter of support for the aggressors within the Castelldefels community.

The following night, the episode was repeated at the same shelter, but this time featuring some 150 people. The police were ready, and managed to disperse the attackers.

“The most harrowing part of that what happened is a representation [to the victims] of who we are – all of us – as a society,” the care worker laments. “We forget our society is also theirs: more diverse and multicultural by the day.”

The same week, a few hundred residents of Canet de Mar gathered in front of the town hall to campaign for the deportation of 50 unaccompanied foreign minors from a nearby housing shelter, calling on them to “go home”.

Less than 48 hours later, a man trespassed into the shelter, armed with a machete, and came face-to-face with at least one of the children. Luckily, police stepped in before anyone was physically hurt.

The left-wing local mayor, Blanca Arbell, blames “malicious groups” within the community for creating “false alarm” about the impact of their new neighbours and spreading “lies” by trying to link migrants with a rise in robbery and petty crime.

Since 2017, Spanish shores have become the main gateway to Europe for people escaping war-torn countries or seeking to better their lives, with over 85,000 arrivals, including 5,277 and counting this year.

A sizeable proportion of those have been classed as immigrants under the age of 18 without their parents. Around 2,000 came to Catalonia last year and in 2019, there have been 428 so far.

The politician responsible for unaccompanied immigrant children in Catalonia concedes more work is required to help them integrate.

“The majority of Catalans reject these attitudes, but we acknowledge that there are small groups starting to carry out attacks on the basis of prejudice and stereotypes,” says Chakir El Homrani, Catalan minister of labour, social affairs and family.

Just as Catalan society has become polarised on independence, it has become more divided about its sea border policy, too.

Whereas separatists want to show that a Catalan state would be multicultural – in contrast to “nationalist” Spain, hardline unionist groups like Vox are accused of blurring the lines between anti-independence and anti-immigration sentiment.

Vox’s local leader, Ignacio Garriga, maintains that the group’s repugnance towards both independence and immigration is through a “love” for Catalonia.

“We have to address the needs of our own people; the Spanish people,” argues Garriga, whose mother was an immigrant from Equatorial Guinea. “Those who accuse us of anything other than ‘loving thy neighbour’ are liars and defamers.”

“We reject both violence ... And illegal immigration.”

Catalonia President Quim Torra: Catalan separatists trial 'terrible mistake'

Vox sparked fury earlier this year by publishing a list of demands, including the deportation of undocumented migrants and eliminating public funding for “Islamic associations”, in exchange for supporting a centre-right coalition.

And according to various polls, immigration is climbing up the list of concerns among Spanish people.