Despite the PP not doing as badly as expected, the Socialist PSOE were the overall winners on a national level once all votes in the over 8,000 town hall elections in the country were added up.
In the vote for Madrid city council, the 31 per cent (19 seats) for current mayor, left-leaning Manuela Carmena, wasn't enough to combine with the 8 seats of the PSOE to give a majority of 29 seats. On Sunday night, with the results still fresh, Carmena accepted that she would not be next mayor; the sum of right-leaning PP, Ciudadanos (Cs) and Vox is more than the left and the door was open to the PP returning to the mayor's office after four years. However, during the week efforts have been made to persuade more centrist Cs to abstain, to allow Carmena to stay, and to prevent Vox having a say in the new town hall make up.
In Catalonia, the former French prime minister, Manuel Valls, who was born in Barcelona, did not do as well as he had hoped, winning just six seats on the 41 seat city council with his Ciudadanos-linked candidacy. However on Wednesday he offered his councillors' votes to either the last mayor Ada Colau, who won 10 seats, or the PSOE party in Catalonia, with eight seats.
The move was designed to prevent separatist ERC, with 10 seats, taking over the council in their own pact with parties.
By June, 15 all pacts need to be complete as mayors are sworn in.