Spain’s state prosecutor has ordered a criminal probe of hundreds of Catalan mayors cooperating with the region’s independence referendum. Spain’s king and prime minister have both decried the vote as unconstitutional.

The office of Spain’s state prosecutor announced on Wednesday that it is investigating hundreds of Catalan mayors for cooperating with an October 1 independence referendum that Madrid deemed illegal.

The prosecutor’s office ordered 712 mayors in Catalonia who have backed the vote to be summoned to court as official suspects in the criminal probe.

Police have been directed to arrest the mayors should they fail to answer the summons, according to the official letter sent to local authorities.

Catalonia’s pro-separatist government has asked the northeastern region’s 947 mayors to provide facilities for polling stations for the independence referendum.

Over 700 municipal leaders pledged to help facilitate the vote, although the mayor of Barcelona has not yet taken a definitive position.

Spanish Prime Minister Mariano Rajoy’s conservative government has vowed to stop Catalonia’s referendum. They argue that Spain’s 1978 constitution bars regional governments from calling independence referendums.

On Wednesday, Rajoy implored people in Catalonia to refrain from taking part in the October 1 vote, saying it would be illegal.

“If anyone urges you to go to a polling station, don’t go, because the referendum can’t take place, it would be an absolutely illegal act,” the prime minister said.