BARCELONA (Reuters) - Separatists on Sunday won a clear majority of seats in Catalonia's parliament in an election that sets the region on a collision course with Spain's central government over independence.

"Catalans have voted yes to independence," acting regional government head Artur Mas told supporters, with secessionist parties securing 72 out of 135 seats in the powerful region of 7.5 million people that includes Barcelona.

The strong pro-independence showing dealt a blow to Spanish Prime Minister Mariano Rajoy, three months before a national election. His center-right government, which has opposed attempts to hold a referendum on secession, has called the separatist plan "nonsense" and vowed to block it in court.

Spain's constitution does not allow any region to break away, so the prospect remains highly hypothetical.

The main secessionist group "Junts pel Si" (Together for Yes) won 62 seats, while the smaller leftist CUP party got another 10, according to official results.

They jointly obtained 47.8 percent of the vote in a record turnout of 78 percent, a big boost to an independence campaign that has been losing support over the last two years.

Both had said before the vote that such a result would allow them to unilaterally declare independence within 18 months, under a plan that would see the new Catalan authorities approving their own constitution and building institutions like an army, central bank and judicial system.

Addressing supporters of Junts pel Si in central Barcelona, Mas said a "democratic mandate" now existed to move forward with independence.

"That gives us a great strength and strong legitimacy to keep on with this project," Mas told the exultant crowd, which chanted "in-inde-independencia" and waved secessionist flags.

Albert Llorent, a taxi driver from Barcelona who had come to celebrate, said the result was one of historic proportions.

"What I think, what I feel, is that I belong to the best possible nation in the world. Long live Catalonia," he said.

Consequences?

The vote in Catalonia, Spain's second-most populous region, is widely expected to influence the course of the Spanish general election in December.

Spain's two dominant parties - the ruling People's Party and the opposition Socialists - lost tens of thousands of votes compared with the last election in 2012, boding ill for their national ambitions, although the PP suffered a much deeper setback than its rival.

Anti-austerity Podemos also registered a disappointing score at 9 percent, sharply down from last May's nationwide regional and local elections.

Among parties opposed to independence, pro-market Ciudadanos, often cited as a national kingmaker, emerged as the only winner as it jumped to 18 percent of the vote.

Despite the separatist victory, analysts believe the most likely outcome of the election will be to force a dialogue between Catalan and Spanish authorities.

"Many have voted for Junts pel Si even if they don't favor secession because they saw the vote as a blank cartridge... and a way to gain a stronger position ahead of a negotiation," said Jose Pablo Ferrandiz from polling firm Metroscopia.

Opinion polls show a majority of Catalans would like to remain within Spain if the region were offered a more favorable tax regime and laws that better protect language and culture.

While investors do not see secession as an immediate material risk, financial markets may react negatively on Monday.

The gap between Spanish five-year bond yields and the higher yields on the Catalan equivalents has been hovering near its widest point in two years in the run-up to the vote.