Demonstrators have marched en masse through Barcelona in protest at the trial of Catalan separatist leaders.

Some 200,000 people took to the streets, waving Catalan flags and shouting pro-separatist slogans in support of the 12 leaders on trial.

The trial, at Madrid's Supreme Court, follows Catalonia's independence referendum and failed attempt to secede from Spain in October 2017.

If convicted, some of the leaders could face up to 25 years in prison.

The Catalonia crisis is thought to be the most serious to hit Spain since the death of dictator Francisco Franco in 1975, and the country's transition to democracy.

Soon after the referendum, Spanish authorities had declared that it was illegal, and the national government imposed direct rule over the semi-autonomous region.

Prosecutor Fidel Cadena told the court that the separatists were promoting "subversion and rupture of the constitutional order". Spain's 1978 constitution speaks of "the indissoluble unity of the Spanish nation".

But the separatist leaders' lawyer, Andreu Van Den Eynde, said the trial was about "the right to self-determination and the democratic principle".

"There is no international or European Union law that prevents the secession of a sub-state entity," he added. "It does not exist."

The supporters of those on trial appear to agree.

One banner, carried by a protester at the front of the march, read "freedom for political prisoners", another "self-determination is not a crime".

Speaking at the trial, key defendant Oriol Junqueras rejected claims they were violent.

"If you read, listen and observe our actions, no-one could have the least doubt that we reject violence," he told the court on Thursday.