BARCELONA (Reuters) - More than 700 mayors from across Catalonia gathered in Barcelona on Saturday to confirm their support for a planned independence referendum that Madrid has declared illegal.

Slideshow ( 13 images )

The Catalan government plans to hold a referendum on self rule for the wealthy northeastern region on Oct. 1, despite strong opposition from government which has challenged the vote in the Constitutional Court.

The mayors met with Catalonia’s regional head Carles Puigdemont in a show of defiance, following Spanish prosecutors warning earlier this week that officials engaging in any preparations for the vote could be charged with civil disobedience, abuse of office and misuse of public funds.

On Wednesday, Spanish prosecutors summoned for questioning more than 700 mayors who had said they would allow municipal spaces to be used for voting. If the mayors do not respond to the order, police should arrest them, the order said.

Meeting in downtown Barcelona in front of hundreds of flag waving pro-independence protesters, the mayors gave speeches in which they promised continued support for the referendum amid chants of “we will vote” and “independence.”

Barcelona mayor Ada Colau, who has reached an agreement with the Catalan regional government to allow voting in the city, criticized Madrid’s response to the crisis in a short speech in the city hall.

“It’s a disgrace that we have a government that is incapable of dialogue and instead dedicates itself to pursuing and intimidating mayors and the media,” Colau said.

So far, 740 of 948 municipal leaders have said they would allow municipal spaces to be used for the referendum, according to the Association for Municipalities for Independence (AMI).

Spanish police have raided several print shops and newspaper offices in recent days in a hunt for voting papers, ballot boxes and leaflets to be used for the referendum.

Catalonia’s top court on Friday issued a warning to seven newspapers not to publish campaign notices for the referendum, a court spokesperson said.

On Saturday, Prime Minister Mariano Rajoy called for a return to “rationality and legality” and promised to block the vote.

“The only thing I ask of (Catalan) mayors is that they comply with the law, and as such don’t participate in an illegal referendum,” Rajoy said.

Polls show a minority of Catalans want independence, although a majority want the chance to vote on the issue.

The Scottish government lent its support to the Catalan referendum. Cabinet Secretary for External Affairs Fiona Hyslop said Scotland’s 2014 referendum on self rule, which was agreed to by both Westminster and Edinburgh, was a positive example of how to resolve such disputes.

“All peoples have the right to self determination and to choose the form of government best suited to their needs, a principle which is enshrined in the UN Charter,” Hyslop said in a statement on Saturday.

The “No” side won in the Scottish independence referendum.