Spain’s constitutional court has suspended the planned referendum in Catalonia , halting all campaigning and preparations for the vote on independence just two days after it was formally called by the Catalan leader, Artur Mas.

In a special meeting on Monday evening that lasted just over an hour, the court unanimously agreed to hear the central government’s court challenge to the referendum. The decision automatically suspends the referendum, as well as the law that allowed the regional government to call the vote, for up to five months.

The court’s announcement came hours after the prime minister, Mariano Rajoy, described the referendum as an affront to the rights of all Spaniards.

Calling the vote “anti-democratic,” he said the country’s constitution prevented any region from unilaterally making decisions that affected all Spaniards. “We can’t allow the will of a few to deprive everyone else of their rights,” he said.

The court said it would allow both parties to submit arguments. Mas has already said that he will try to convince the tribunal to lift the suspension so that the vote can go ahead as planned on 9 November.

Until the court’s announcement, the legal limbo surrounding the referendum had allowed the campaign to begin. On Sunday the Catalan government launched the referendum website and a video urging citizens to vote.

Catalonia’s vice-president, Joana Ortega, standing in front of half a dozen ballot boxes, said authorities were preparing more than 10,000 ballot boxes and six million ballots, while the pro-independence groups Catalan National Assembly and Òmnium Cultural began recruiting 100,000 volunteers for door-to-door canvassing.

As the constitutional court met in Madrid, Mas presented a “white book,” an 18-chapter document, in Barcelona outlining the steps Catalonia would need to take in sectors such as defence, social security and financial viability were it to break away from Spain.

On Monday, Rajoy repeatedly called for dialogue between Madrid and Barcelona, saying there was still time to “right the ship and overcome the sterile dialectic of confrontation”. Before any negotiations could take place, he said, Barcelona must abandon its plans for a vote on independence.

“When one party acts outside the legal framework and against the interests of the rest of us, it cannot be the obligation of the government to find an intermediate meeting point,” he said.

Francesc Homs, the Catalan government spokesman, insisted the sovereignty process would continue regardless of Madrid’s position. Speaking to the Catalan broadcaster TV3 before Rajoy’s announcement, he called the court challenge to the referendum “one of the largest errors in Spanish democracy”.

Polls show a majority of Catalans would like a vote to be held. The central government “think they’re killing it, but I’m convinced that what this does is reinforce the movement in Catalonia”, Homs said.

If the constitutional court did suspend the referendum, he said, the Catalan government would find a way to allow the vote to go forward. “We won’t just stand there with our arms crossed as if the game is over.”