MADRID — It is a trial unlike any Spain has held before, over a conflict that plunged the country into a constitutional crisis and threatened to tear it apart: Leaders of the Catalan independence movement will go before Spain’s Supreme Court this week to face criminal charges including rebellion and violating court orders.

The trial, set to begin on Tuesday in Madrid, is likely to revive debates and stir emotions over Catalonia’s botched secession attempt in 2017. The proceedings will be closely watched in Spain and in other European countries with separatist movements, like Britain and Belgium.

The trial stems from the crisis that unfolded in the fall of 2017 in Catalonia, the wealthy northeastern region of Spain, and that came to dominate Spanish politics. The Catalan regional government called a referendum on independence and pressed ahead with it even after Spanish courts and the national government declared it illegal.

In an unsuccessful attempt to prevent the vote, Madrid sent officers from the national police force to the region, who clashed in the streets with crowds numbering in the thousands. With most anti-secession voters heeding the central government’s call not to take part in the referendum, the push for independence won easily but the vote´s result was immediately declared null and void by Madrid.

Twelve defendants are set to appear before the Supreme Court, most of them former officials of the regional government that organized the referendum and declared independence.

The most prominent is Oriol Junqueras, the former deputy leader of Catalonia and head of Esquerra Republicana, a left-wing separatist party, who could be sentenced to up to 25 years in prison if he is found guilty.

One person who will not be in court is Carles Puigdemont, the former leader of Catalonia and a longstanding secessionist, who is living in self-imposed exile in Belgium.

The Spanish authorities indicted 20 Catalans in late 2017 for their roles in the drive for independence. But several of them, including Mr. Puigdemont, ignored the court summons and fled Spain, and they have successfully resisted extradition attempts to force them to face trial.

In March, Mr. Puigdemont was briefly jailed in Germany, where a court ruled that he could not be extradited to Spain for rebellion, the main charge he faces.

Of the dozen defendants going on trial this week, nine have already spent more than one year in jail, after being denied bail — a situation denounced by Catalan separatists.

The separatists also argue that the defendants should stand trial in Barcelona, not Madrid, claiming that the Spanish courts are biased.

But the central government and Spanish judges have firmly defended the impartiality of Spain’s judiciary. Last Thursday, Prime Minister Pedro Sánchez became the first Spanish head of government to visit the European Court of Human Rights in Strasbourg, France, where he praised his country for its solid judicial record.

About 500 witnesses are expected to testify, including Mariano Rajoy, the conservative prime minister at the time of the separatist turmoil in 2017.

A panel of seven Supreme Court justices will preside over the trial and one of them will then write the verdicts, which must be approved by a majority of the panel.

There is no time limit for the trial, and Carlos Lesmes, the president of the Supreme Court, who is not among those hearing the case, forecast recently that it would last about three months. The justices will then need time to reach their verdicts, so the outcomes are unlikely to be made public before late June, he predicted.

The complicated case against the Catalan separatists has been led by a judge from the Supreme Court, but other courts, in Madrid and Catalonia, are also handling separate cases linked to the upheaval in 2017.

In one, Josep Lluís Trapero, the former head of the Catalan regional police force, is due to appear before Spain’s national court in Madrid to face sedition charges. In Catalonia, dozens of town mayors are under indictment for facilitating voting in the referendum.

About 20 Spanish police officers are awaiting trial in Catalonia, accused of using violence to stop citizens from voting in the referendum. In the two police cases heard so far, neither officer was found guilty of wrongdoing.

The trial is taking center stage — covered live on national television and by over 600 accredited journalists — amid political deadlock and continued tensions over the future of Catalonia.

While separatism has sharply split Catalan society, it has also helped reshape the national politics of Spain.

The country’s main right-wing opposition parties have recently accused Mr. Sánchez, the prime minister, of making undue concessions to Catalan separatist parties, to maintain parliamentary support for his minority Socialist government. On Sunday, tens of thousands of right-wing protesters gathered in Madrid to denounce Mr. Sánchez’s handling of the Catalonia crisis and to demand his ouster.

Mr. Sánchez came into office in June, promising to renew dialogue with Catalonia’s leadership, but Pablo Casado, the leader of the conservative Popular Party, recently called the prime minister a “felon” and “traitor” for “ceding to the pressure of those who want to destroy Spain.”

The Supreme Court trial will provide a platform for Vox, a far-right party that made its electoral breakthrough in December, in the southern region of Andalusia. Vox’s lawyers filed their own set of charges against the Catalan separatists, to reinforce those of the state prosecution, giving them a role in the trial.

In Catalonia, Quim Torra, a separatist who now leads the regional government, has a tenuous grip on power; a coalition of the two main separatist parties recently splintered. He has pledged to continue the push for independence, but has not provided a road map for that goal.

If they are found guilty, the defendants could appeal to the Constitutional Court. If that appeal fails, they could appeal to the European Court of Human Rights in Strasbourg.

In September, the representative of the central government in Catalonia, Teresa Cunillera, also raised the possibility that Mr. Sánchez could use his executive powers to pardon Mr. Junqueras and others, should they be found guilty. Spain’s opposition parties, however, have vowed to prevent any political pardons.

There is still the possibility of yet another trial, if the Spanish authorities reactivate European arrest warrants for Mr. Puigdemont and others, and succeed in having them extradited.