Former Catalan chief Carles Puigdemont and four former ministers were freed from custody on Monday with conditions by a judge in Belgium, Reuters reported. The Brussels court said that the five can remain free until it heard the charges of rebellion filed against them by Spain.

Puigdemont and his former advisors had turned themselves in to the Belgian police on Sunday. The five former officials are wanted on charges of rebellion, sedition, misuse of public funds, disobedience and breach of trust.

The Brussels court barred them from leaving the country without permission and has also asked them to give details of their accommodation, BBC reported. They have been asked to appear in court within 15 days.

The order allows Puigdemont to campaign for the election scheduled to be held on December 21 to form a new Catalan parliament. Puigdemont had earlier said that he would return from Belgium immediately if a fair judicial process is guaranteed in Spain.

The Spanish government has taken direct control of Catalonia, after stripping its government of autonomy following its declaration of independence from Spain.