CATALONIA is on a collision course with Spain after nationalists won a majority of seats - but not votes - in parliamentary elections seen as a proxy independence referendum.

Two slates campaigning for full Catalan sovereignty made dramatic headway amid a record turnout in Sunday’s historic polls, despite an unprecedented negative campaign against them, including hints of military action.

However, the main secessionist group "Junts pel Si" - Together for Yes - and its leftist pro-independence allies CUP fell just short of half the popular vote.

That leaves them in overall control of Catalonia’s autonomous parliament in a huge boost for an independence movement that had been seen to be losing steam in recent years.

Catalan President Artur Mas - set to be re-elected - had signalled that any majority in parliament would allow Catalonia to unilaterally declare independence within 18 months.

His government has already drawn up a road map - called the hoja de ruta - that would see the new Catalan authorities approving their own constitution and building institutions like an army, central bank and judicial system.

Spain’s right-wing government of Prime Minister Mariano Rajoy, which has opposed attempts to hold a referendum on secession, has called the breakaway plan "a nonsense" and vowed to block it in court. Spain's constitution does not allow any region to break away. Last week, as Catalans prepared to vote, there were even suggestions that Mr Mas would be indicted if he attempted UDI.

Junts pel Si insiders had always felt that they would need 50 per cent of the vote to win international legitimacy for any unconstitutional breakaway. With a difficult coalition with CUP to manage, a UDI may be off the agenda for the time being for Mr Mas, observers said.

However, Sunday’s results remain a firm launching platform to bring Mr Rajoy - or whoever wins Spanish general elections just before Christmas - to the negotiating table.

With 96 per cent of ballots counted, Junts pel Si had taken 39.6 per cent of the vote and 62 of the 135 parliamentary seats. At the same stage CUP had 10 seats and 8.2 per cent of the vote.

But one of the other big winners of the night was the ultra unionist Ciutadans or Citizens Party, which remains deeply antagonistic to Catapan independence. It effectively becomes the main opposition party with 17.9 per cent and 25 seats after 96 per cent of votes were counted.

Crucially, the only party in Spain that makes a serious attempt to support federalism, the once mighty Catalan socialists or PSC were heading for 12.7 per cent and 16 seats.

The vote is counted on a d’Hondt proportional representation system.

Sunday’s results create additional uncertainty over potential talks over a more favourable tax regime and laws that better protect language and culture, which analysts say are needed to soothe Catalan discontent.

Many of the 5.5 million voters had said on Sunday that they did not believe Catalonia would become independent and had used their ballot as a way to press the Catalan and Spanish authorities to discuss those issues.

Alyn Smith, an SNP MEP observing the process and a close ally of senior Junts pel Si figures, said: "From the chats I'm having I sense a real 'onwards and upwards' vibe.

“If anything the lack of a majority will steel efforts towards a well thought out process, UDI is off the table and I think that will serve Catalunya well- there is a clear pro referendum majority and the Spanish elections are in December. Catalunya's history is not ended yet.”

There was no coherent No campaign in Catalonia ahead of the elections. At least one of the slates - a joint one between anti-establishment party Podemos, Greens and other alternative parties - has said it would like to see a referendum. Podemos, called Podem in Catalonia, has become increasingly anti-independence in its rhetoric.

The results of the proxy referendum, therefore, points to huge popular support for what Catalans call the dret de decidir, the right to decide, or real Scottish-style referendum. The current Madrid government remains resiliently opposed to this and any plebiscite has been declared unconstitutional, including a putative one planned for November 2014.