High school and university students hold mass rally in Barcelona to Catalonia's right to vote.

Thousands of striking high school and university students have marched in Barcelona in support of Catalonia's independence referendum which the Spanish central government in Madrid has vowed to stop.

"We will vote!" and "Independence!" the protesters shouted as they marched along the Gran Via, one of Barcelona's main avenues, on Thursday. Many were draped in red and yellow Catalan independence flags.

Barcelona police said 16,000 people took part in the protest, while organisers put the figure at 80,000.

A young female protester at the march said: "We want the independence because we are sure that we will be better without being part of Spain."

The Catalan government has insisted it will press ahead with Sunday's disputed plebiscite in the wealthy northeastern region, which is home to 7.5 million people, despite a crackdown by Madrid which wants to prevent a vote ruled unconstitutional by the courts.

The showdown is one of Spain's biggest political crises since the end of the dictatorship of General Francisco Franco four decades ago.

Opinion polls show Catalans are split on the issue of independence, but a large majority want to vote in a legitimate referendum to settle the matter.

"The majority of young people are separatists, and if they weren't, they have become separatist after seeing what Spain has done in recent weeks," 16-year-old high school student Aina Gonzalez told AFP news agency.

Over the past few days, judges and prosecutors have ordered the seizure of electoral material, including millions of ballot papers, the closure of websites linked to the vote and the detention of key members of the team organising the referendum.

The electoral board set up to oversee the vote has been dissolved, and on Wednesday a judge ordered police to prevent public buildings from being used as polling stations.

'Disruption of public order'

Some students have said they may occupy schools and universities that could be used as polling stations, which firefighters and farmers have vowed to protect.

"We will stay there all day, just to wait for the vote," said Laia Puchol, a student.

"We, the firefighters, have to go and vote as every citizen can do," said Xavier Graells, a firefighter.

Catalonia's regional police force, the Mossos d'Esquadra, has warned of the risk of "the disruption of public order" if officers try to prevent people from casting ballots.

But Spain's central government downplayed the risk of violence.

"If the judge's orders are carried out ... there is no reason for there to be a violent response on the part of anybody, and I trust this will be the case," secretary of state for security, Jose Antonio Nieto, told reporters.

Lorena Torrecillas, a 27-year-old physiotherapist who passed by the student protest, said she opposed independence because the pro-separatist camp had not explained well enough what the advantages of splitting from Spain would be.

"I prefer to remain with what is known than with what will come because it could be very good or very bad," she told AFP.