Hundreds of thousands of people marched down Barcelona’s broad Passeig de Gràcia this afternoon behind the slogan no tinc por (I am not afraid), in a show of defiance after last week’s terror attacks that left 15 people dead and over 100 injured in Barcelona and Cambrils.

The protest, which apart from pro-independence rallies was the largest in the city since some two million protested against the Iraq war in 2003, was called by the city council and the Catalan government. Ada Colau, the Barcelona mayor, called on people to “fill the streets to overflowing” and to show unity in the face of threats of further attacks on Spain from so-called Islamic State.

The march was led by police and members of emergency and voluntary services. Determined to present a united front in the midst of the simmering secessionist row and with Catalonia’s controversial independence referendum barely a month away, the Spanish political establishment turned out in force behind them.

Led by Felipe VI, the Spanish king, the prime minister Mariano Rajoy marched alongside an array of senior government officials, opposition leader Pedro Sánchez, the Catalan president Carles Puigdemont, leaders from several of Spain’s 17 autonomous regions, the mayor of Madrid and the heads of the two main trade unions.

Facebook Twitter Pinterest People stand around tributes on Las Ramblas, Barcelona, where 13 people were killed in a terror attack on 17 August. Photograph: Manu Fernandez/AP

However, despite pleas not to politicise the march, there were plenty of Catalan independence flags in evidence, though also a number of Spanish flags, a rare sight in Barcelona. There were also anti-government placards and many with the slogan “your wars, our dead” that called for an end to the arms trade.

Nevertheless, the atmosphere was one of warmth and solidarity and no tinc por (I am not afraid) was the only slogan chanted on the march. Many carried red, white and yellow roses, the colours of the Barcelona coat of arms – 70,000 of which were distributed by the city’s florists.

There were messages of support from mayors around the world, including London’s Sadiq Khan, Anne Hidalgo, mayor of Paris and New York mayor Bill de Blasio, among others.

As the march ended in Plaça de Catalunya at the top of Las Ramblas, a number of people booed the king and prime minister. Police officers had to close off the square because there was no room for more people, although thousands of marchers continued to arrive.

Facebook Twitter Pinterest Spain’s political establishment united for the rally with (left to right): Barcelona mayor Ada Colau, Catalonian president Carles Puigdemont, King Felipe VI, Spanish prime minister Mariano Rajoy, and presidents of the Spanish parliament, Ana Pastor, and senate, Pio Garcia Escudero. Photograph: Andreu Dalmau/EPA

In a brief ceremony, the actress Rosa Maria Sardà read a poem by Federíco Lorca while the spokeswoman of the Islamic organisation Ibn Battuta, Míriam Hatibi, told the crowd: “We are not afraid because we know that love will triumph over hate.”

There was total silence when two cellist played El Cant dels Ocells (Birdsong), the traditional children’s song made famous by the cellist Pablo Casals who went into exile at the end of the Spanish civil war. The song has come to symbolise the dark years of repression under the Franco dictatorship.

Speaking at the end of the march, Colau said: “We talk a lot about diversity, but it’s not enough to talk about it, we have to make it a reality. An attack like this marks a city, the country and its people. But it’s one thing if it leaves a wound, another if what’s left is a scar.”

However, despite the display of unity, it seems only skin deep. On Friday Puigdemont said in an interview that the 1 October referendum will go ahead as planned and that to cancel or postpone it would be giving in to the terrorists.

Rajoy has said all along that the referendum will not take place although he has not made clear what measures would be taken to prevent it.

“We already have 6,000 ballot boxes,” Puigdemont said. “I don’t see what the state can do to stop us.”

• This article was amended on 28 August 2017 to clarify that the size of the protest did not exceed the size of crowds at pro-independence rallies.