MADRID — A Spanish Supreme Court judge is set to decide on Monday if two Catalan pro-independence activists and eight former members of the separatist regional cabinet ousted over a month ago should be released from custody after hearing their appeal.

The 10 requested Friday’s court appearance to pledge lawful behavior and renounce unilateral independence efforts in the hope of being released.

Most of them are running in an early regional election this month that Spanish central authorities called after they took control of Catalonia in response to the regional lawmakers’ declaration of independence. Official campaigning begins at midnight on Monday.

Spain also dismissed the regional government as part of unprecedented measures to rein in the country’s deepest political crisis in nearly four decades of democratic rule.

The lower National Court provisionally jailed the 10 Catalans while magistrates probe their roles in relation to the secession bid.

The eight politicians, including former regional Vice President Oriol Junqueras, face possible charges of rebellion, sedition and embezzlement that can be punished with decades in prison. They were among the leading figures involved in events that crystalized in the Oct. 27 independence vote.

Former Catalan leader Carles Puigdemont and four ex-ministers are fighting extradition from Belgium over similar charges.

“We want you at home. You must leave the jail because you should have never entered it. Do whatever is necessary to come out. We have a lot to do,” wrote Puigdemont in a tweet on Friday.

Jordi Sanchez and Jordi Cuixart, the two leaders of grassroots separatist groups Assemblea Nacional Catalana and Omnium Cultural respectively, are accused of sedition for their roles in protests in Barcelona that hindered a judicial investigation into preparations for an independence referendum on Oct. 1.

After the proceedings, the 10 were sent back to jails around Madrid where they will wait for magistrate Pablo Llarena’s decision on Monday.

Both the public prosecutor and plaintiffs from a small right-wing political party asked the judge to uphold the custody order because their testimonies, they said separately, failed to eliminate the risk of fleeing or the repetition of the crimes in the near future.

Defense lawyer Jordi Pina, who represents two of the former Catalan officials and ANC leader Sanchez, said he hoped for an early release after they pledged to abide by Spain’s Constitution, which enshrines the nation’s indivisibility.

Supporters and party aides of the defendants gathered outside the court in central Madrid on Friday. Some of them said that money had been raised to make immediate payments if the judge decides to release them on bail.

Joining them was former Catalan regional president Artur Mas, a key figure in Catalonia’s independence movement since 2012. Speaking to reporters, Mas said he understood the defense strategy, but criticized the central government’s decision to take control of the region.

“Anybody who is in jail unjustly has all the right in the world to develop any argument that leads to freedom,” Mas said.

Preliminary polls are predicting a close race between candidates for and against independence in the Dec. 21 regional election, but they also show that any winner will need to negotiate support to form a new government.