Crowds of Catalans waving red and yellow flags have thronged the streets of Barcelona demanding independence, a fortnight ahead of regional polls billed as an indirect vote on breaking away from Spain.

Organisers of Friday's protest said close to 500,000 people registered to form a white "human mosaic" symbolising a blank page and the new country they hope to build after the September 27 elections, portrayed by local authorities as a proxy vote on secession.

The crowds packed both sides of a major road into the city in a sea of striped Catalan flags and white T-shirts, yelling and whistling while some formed human pyramids - a Catalan folk tradition.

Catalan voters back independence

The show of force on Catalan national day - the fourth such mass rally in as many years - came at a time of political tension, three months ahead of a general election in Spain.

Polls this week showed pro-secession candidates could win a majority of seats in the Catalan parliament in ballots on September 27, even though they may fail to win the most votes.

If they win parliament, Catalan president Artur Mas has vowed to push through an 18-month roadmap for secession for the region, which accounts for a fifth of Spain's economy.

"Once the people have spoken through their vote, we will all take on board what the majority decides," said Mas, a conservative who is campaigning in an alliance with left-wing nationalists.

Majority in favour

Spain's conservative Prime Minister Mariano Rajoy fiercely opposes independence and a plebiscite, saying all Spaniards reserve the right to vote on issues of sovereignty.

Mas is casting this month's election as a de facto vote on independence, like ones in Scotland last year and in Canada's French-speaking province of Quebec in 1980 and 1995. Those votes all resulted in a "no" to secession.

"We would have preferred a referendum like in Quebec and Scotland, but the only course left to us was to organise these elections," Mas told a gathering of foreign media on Friday.

Polls show a majority of Catalans are in favour of a referendum even if they are almost evenly divided on independence.

Catalan nationalism has intensified in Spain's economic downturn.

Separatists say they pay an unfair level of taxes to Madrid compared to the funding Catalonia receives.

"No matter much they tell us we cannot leave, we will push ahead," said Vida Domenech, 38, a demonstrator wrapped in a red, yellow and blue pro-independence flag.

"We cannot let ourselves be the only region that pays so much and receives so little."