MADRID — The Spanish Supreme Court on Friday blocked a leader of the Catalan independence movement from leaving jail to take his seat in the European Parliament.

The separatist leader, Oriol Junqueras, is one of 12 people charged with rebellion and other crimes over Catalonia’s failed attempt to secede from Spain in 2017. The Supreme Court closed that trial on Wednesday, after listening to more than 400 witnesses over four months; a verdict is not expected until the fall.

Mr. Junqueras, who was the deputy leader of Catalonia, has been in prison since late 2017, but has maintained significant influence over Catalan politics. He still leads the Esquerra Republicana party, which recently became the largest Catalan party within the Spanish Parliament, and was elected to both the Spanish Parliament and the European Parliament.

In order for him to officially become a member of European Parliament, Mr. Junqueras has to register with the electoral authorities in Madrid. The court said on Friday that allowing him to collect his credentials and travel to Brussels would represent “an irreversible risk” to the completion of his trial and would involve a “loss of jurisdictional control.”