AIDA DEL VALLE lives in a block of new flats owned by Spain’s “bad” bank, Sareb, with big windows overlooking a small Barcelona square. The 34-year-old former schoolteacher, who receives unemployment benefits of €300 ($331) a month, pays no rent or utility bills. She owes her tenancy to a housing-activism group that broke into the unfinished building and took it over. One of the group’s founders is Ada Colau, who on June 13th became Barcelona’s mayor.

Ms Colau is one of a number of candidates who have infused the Spanish left with fresh vigour. Her rainbow coalition of activists and parties, including the insurgent party Podemos, narrowly beat the incumbent Catalan nationalist Convergence and Union coalition (CiU). Podemos-backed candidates also took control of Madrid and other major cities. Ms Colau’s first moves included slashing her salary by three-quarters to €2,200 per month and dropping prosecution of student activists accused of vandalism. Her counterpart in Madrid, the 71-year-old Manuela Carmena, met the heads of Spain’s mighty Santander and BBVA banks to discuss the thousands of homes they have seized since Spain’s property bubble burst. The left’s victories mean Spanish cities may start fining banks for holding on to empty houses.

City halls will provide a first taste of how Podemos, which is just 18 months old, handles power. It may get a lot more of it in parliamentary elections this autumn. Current polls show the governing conservative Popular Party losing power to the Socialist Party. The Socialists would then have to form a minority government heavily dependent on Podemos.

But while Spanish politics is shifting to the left, it is also fracturing. Barcelona’s city hall now has seven groups on the 41-member council. On June 18th Catalan politics splintered further when the 37-year-old CiU coalition, made up of the Convergence and Union parties, fell apart over separatism. The Convergence leader, Artur Mas, who is also president of the region, wants to lead a separatist platform into the local elections on September 27th. The Union party calls for moderation and a negotiated settlement with Madrid.

Many in Convergence are happy to be rid of Union. But they must now scrap for separatist votes with the Catalan Republican Left and the radically left-wing Popular Unity Candidates. The divorce is a major upheaval for Catalan politics, which had been dominated by CiU ever since the region regained a degree of self-government in 1980. Political institutions must be restructured. The CiU’s deputies in the Madrid parliament, who have occasionally held the balance of power, have split too.

Catalans are now divided into separatists, anti-separatists, and third-way federalists who believe the region should nonetheless be allowed to vote on independence (an option blocked so far by Mariano Rajoy, the prime minister). All three camps have at least two parties competing for their votes. But the eruption of Podemos has seen public interest shift from secession towards social matters like poverty and housing. “Mas’s government has used independence to cover up its cuts in health and education,” says Carlos Macías, a housing activist in Barcelona. Podemos-style radicalism is an alternative to separatism for those with a Utopian bent.

As if things were not complicated enough, the rise of the centrist Ciudadanos party has made Spain’s general election a four-way race. The fracturing of politics is forcing politicians to learn how to build alliances. The task of forming governments has become harder. But solutions to some problems—including Catalan separatism—may become easier to find.