Barcelona's acting mayor Ada Colau was re-elected on Saturday, beating a Catalan separatist who had come first in municipal polls, after reaching a deal with the socialists and getting unexpected support from France's former prime minister Manuel Valls.
Hundreds of independence supporters filled the square in front of the city hall as voting took place in a constituent session also attended by Joaquim Forn, Catalonia's former regional interior minister who is in jail and on trial over a failed secession bid in October 2017.
Forn, who was elected as a councillor in municipal elections on May 26, was allowed to leave prison temporarily to attend the session.
Colau narrowly lost those local elections to Ernest Maragall, a veteran politician from ERC, a party that wants Catalonia -- the northeastern region ruled by separatists -- to be independent from the rest of Spain. He gained 10 seats out of 41 in the city council, as did Colau. Maragall beat her by fewer than 5,000 votes.
If he had gained the necessary support to get an absolute majority of 21 in the city council, he would have become Barcelona's first separatist mayor in modern Spanish history.
That would have been a significant change in Spain's second biggest city, a tourist magnet, as the independence movement moves to conquer new power centres in Catalonia.
But in Saturday's constituent session, Colau was re-elected with 21 votes.
The vote is anonymous but Colau had already reached an agreement with the Socialist Party to support her.