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.

Watch video 00:34 Catalan parliament separatists sing

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.

Read more: Catalan independence: Police told to seize ballot boxes

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.

Prime Minister Mariano Rajoy urged people in Catalonia not to go to the polls

Rajoy: Voting would be 'an illegal act'

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.

Read more: Terror attacks in Spain could pose problems for Catalonian independence

Commenting for the first time on the political crisis, Spain's King Felipe VI said people should respect Spain's constitution, which forbids secession.

Listen to audio 03:15 Share Inside Europe: Terror and Catalonia's drive for independence Send Facebook google+ Whatsapp Tumblr linkedin stumble Digg reddit Newsvine Permalink https://p.dw.com/p/2jW68 Inside Europe: Terror and Catalonia's drive for independence

Felipe said the constitution "will prevail" against any attempt to break Spain apart.

The king added that the rights of all Spaniards will be upheld against "whoever steps outside constitutional and statutory law."

Later on Wednesday, the Catalan government's website for information on the vote, referendum.cat, was taken offline. Spanish media reported that the regional prosecutor had ordered all websites promoting the independence referendum to be taken down.

Civil Guard police later confirmed that they had issued a warrant at the website's offices, but declined to say whether they had been ordered by a judge to shut down the site.

Push for independence

Spain's Constitutional Court suspended a referendum law that was fast-tracked through Catalonia's regional parliament last week. In 2015, the court declared regional independence referendums to be unconstitutional.

However, the pro-independence coalition ruling Catalonia has pledged to hold the vote despite the prohibition.

Catalonia, which is roughly the size of Belgium, accounts for one-fifth of Spain's economic output. The region already has significant powers over matters including education and health care.

Spain's economic troubles and a perception that the region pays more in taxes than it receives in investments from Madrid have helped push the secessionist movement.

Hundreds of thousands of Catalans rallied on Monday in Barcelona on their national day to demand their region's independence from Spain.

rs/sms (AP, AFP, Reuters)