Barcelona has "severed ties with Israel" and ended its twinning relationship with Tel Aviv on Wednesday, in an apparent show of solidarity with Palestinians.
The Municipality of Barcelona said the decision was "to invite them to work for peace" after months of campaigning by trade unions and community organisations.
Two months ago, a coalition of city associations named 'Prou Complicitat' - Catalan for "Enough Complicity" - put forward a petition to ask Barcelona's Town Hall to cut its ties with the Israeli state and reinforce cooperation and support toward the Palestinian people.
More than 100 local NGOs and 4,000 residents signed the petition to lobby the Catalan parliament to take the historic step.
On Wednesday, the mayor formally accepted.
"The number and gravity of violations documented in the Palestinian territories have entered a new era of impunity," said Mayor Ada Colau in a letter to Israeli PM Benjamin Netanyahu.
"I cannot remain impassive in the face of the systematic violation of the basic human rights of the Palestinian people."
Palestinian organisations praised the move as a "victory for Palestine".
"A very courageous act by the respectful Lady Mayor of Barcelona. We Palestinians do appreciate it very much," tweeted activist Abdel-Kader Muhtadie.
Barcelona is the capital of Catalonia, an autonomous region in Spain with strong pro-independence sentiment, and has expressed support for Palestinians in the past.
The Catalan parliament became the first in the EU to formally recognise that "Israel is committing the crime of apartheid against the Palestinian people".