An exit poll suggests separatists are set to win the Catalonian elections – raising the prospect of a declaration of independence.
The TV3 poll puts the Together for Yes group of secessionists on 63-66 seats in the 135-member parliament.
Though this is short of a majority, the radical left pro-independence Popular Unity Candidacy party is projected to win between 11 and 13 seats – and the two parties could join forces.
Together for Yes has pledged to unilaterally declare independence within 18 months.
The separatists want to impose their own constitution and build an army, central bank and judicial system.
The central government in Madrid says it would block any declaration in court because it would breach the Spanish constitution.
Prime Minister Mariano Rajoy has opposed attempts to hold a referendum on secession and has labelled the breakaway plan “a nonsense”.
One compromise could be the implementation of a more favourable tax regime and laws that better protect language and culture, which may soothe Catalan discontent.
Final election results are expected late on Sunday or early Monday.