BARCELONA - Spain's Catalonia region voted in a symbolic ballot Sunday on whether to break away as an independent state, defying fierce challenges by the Spanish government.

Voters of all ages queued around the block, some applauding, as polling stations opened after weeks of tense legal wrangling with Spanish authorities. In one of Spain's richest but most indebted regions, a long-standing yearning for independence has swelled over recent years as recession and political corruption scandals have shaken Spain, and the desire to break away has been sharpened by resistance from Madrid.

‘This is an opportunity we could not miss. We have been demanding it for a very long time,’ said Martin Arbaizar, 16, queueing under blue skies to vote in a school in Barcelona. Spain's conservative government challenged the vote in the courts, forcing Catalan leaders to water it down from a non-binding referendum to a merely symbolic vote organised by volunteers.

Prime Minister Mariano Rajoy, who has vowed to defend the unity of Spain as it recovers from recession, said the vote ‘will not have any effect’. But voters were undeterred, fired up by the independence referendum held in Scotland in September, despite Scots voting 'no'. ‘Even though it may not be official, the important thing is that they listen to us,’ said Arbaizar. ‘The more people vote and the more noise we make, the better.’

Proud of its distinct language and culture, Catalonia, a region of 7.5 million people, accounts for nearly a fifth of Spain's economy. Demands for greater autonomy there have been rumbling for years, but the latest bid by the region's president Artur Mas has pushed the issue further than ever before. Catalonia took a step towards greater autonomy in 2006 when it negotiated with Madrid a charter that assigned it the status of a ‘nation’.

But in 2010 Spain's Constitutional Court overruled that nationhood claim, fuelling pro-independence passions. In 2012 Rajoy rejected demands by Catalonia's president Artur Mas for greater powers for the region to tax and spend, prompting Mas to promise an independence vote. Bowing to an injunction by Spain's Constitutional Court, Sunday's ballot has no official electoral roll but the regional government says 5.4 million Catalans and resident foreigners aged 16 and over are eligible to vote.

Ballot boxes were set up at schools and town halls even though the central government warned the regional government that it cannot use public resources for the vote. No incidents were reported by midday on Sunday as voting went on at stations staffed by some 41,000 volunteers. Crowds of voters applauded Mas as he voted in Barcelona on Sunday morning. ‘Mas for president, Catalonia independent,’ they yelled.

Several political groups and lobbies opposed to independence said they had filed lawsuits against the Catalan authorities for organising the vote. State prosecutors said they were gathering evidence to see whether Catalan authorities breached court injunctions by opening polling stations and mailing campaign material. ‘If there are reprisals, that will be unfair,’ said Jordi, a 56-year-old teacher staffing a polling station in Barcelona. ‘I don't care at all. What are they going to do, put 40,000 volunteers in jail?’

Critics say the polls are skewed since those who take vote will be overwhelmingly in favour of independence. ‘Call it whatever you like, but it is not a referendum, not a consultation, nor anything like it,’ Rajoy said on Saturday. ‘What is certain is that it will not have any effect.’ But a strong turnout could strengthen Mas's hand in trying to make the national government negotiate. ‘It has taken a lot for us to get to this stage,’ said Carme Forcadell, leader of the Catalan National Assembly, the main pro-independence lobby. ‘Just by voting, we have already won.’