Spain’s prime minister has called on Catalan separatist leaders to end their “escalation” as several thousand people took to the streets of Barcelona to protest at Madrid’s attempts to stop a banned referendum on independence.

“Stop this escalation of radicalism and disobedience once and for all,” Mariano Rajoy said in a televised statement on Wednesday night as protesters remained in the centre of the city after a day-long demonstration.

Catalonia’s president earlier accused the Spanish government of suspending the region’s autonomy after police intensified efforts to stop a vote on independence that has sparked one of the worst political crises since Spain’s return to democracy four decades ago.

Spanish Guardia Civil officers raided a dozen Catalan regional government offices and arrested 14 senior officials on Wednesday as part of an operation to stop the referendum from taking place on 1 October.

Carles Puigdemont, the head of Catalonia’s pro-sovereignty government, described the raids as a “a co-ordinated police assault” that showed that Madrid “has de facto suspended self-government and applied a de facto state of emergency” in Catalonia.

He also appeared to draw a parallel between the raids and the repression and abuses of the Franco dictatorship, tweeting: “We will not accept a return to the darkest times. The government is in favour of liberty and democracy.”

Speaking after an emergency ministerial meeting, Puigdemont vowed the poll would go ahead.

“We reaffirm our peaceful response,” he said. “The Spanish government has crossed a red line and become a democratic disgrace.”

The mayor of Barcelona, Ada Colau, called the raids “a democratic scandal” and said Catalans would defend their institutions.

Tensions between Madrid and Barcelona have escalated rapidly over recent days as the government of the Spanish prime minister, Mariano Rajoy, attempts to make good its promise to stop the vote.

On Wednesday morning, Spain’s interior ministry announced it was cancelling leave for all the Guardia Civil and national police officers tasked with preventing the referendum. In a statement, it said the affected officers would have to be available between 20 September and 5 October, but added the period could be extended if necessary.

in his TV address, Rajoy called on Catalonia’s regional leaders to cancel the referendum on the grounds that it goes against Spain’s laws. “Don’t go ahead. Go back to the law and democracy. This referendum is a chimera,” he said.

Q&A

Why does the Spanish government say the Catalan referendum is illegal?

The Spanish government argues that any referendum on Catalan independence would be illegal because the country’s 1978 constitution makes no provision for a vote on self-determination.

The raids come a day after the Guardia Civil confiscated referendum documents from the offices of a private delivery firm in the Catalan city of Terrassa. More than 1.5m referendum leaflets and posters have also been seized.

The Catalan high court said that police acting on a judge’s orders had searched 42 premises on Wednesday – including six regional government offices – adding that 20 people were being investigated for alleged disobedience, abuse of power and embezzlement related to the referendum.

The regional government confirmed that Josep Maria Jové, secretary general of economic affairs and an aide to the Catalan vice-president, and Lluis Salvado, the secretary of taxation, were among those arrested.

The Spanish interior ministry said that police had confiscated nearly 10m ballot papers. Polling station signs and documents for electoral officers were also seized during a raid on a warehouse in a small town outside Barcelona.

As news of the arrests emerged, a crowd began to gather outside the finance ministry, one of the targets of the raids. By mid morning the crowd had swelled to more than 2,000 people blocking Gran Via, one of Barcelona’s principal thoroughfares.

By late afternoon, under the clatter of surveillance helicopters and with a heavy police presence, the angry but peaceful rally had grown to some 5,000, with hundreds more people joining as they finished work or got out of school.

The crowd, breaking into the Catalan national anthem and waving placards reading “We are voting to be free,” began by chanting “No tinc por” (I’m not afraid) – the slogan used in response to last month’s terrorist attacks in the city.

But the chant was soon replaced by a new cry: “Occupation forces out!”

Smaller demonstrations were being held in other parts of the city, blocking major roads and causing traffic chaos. The mood was tense and very different from the party atmosphere at the million-strong pro-independence rally a little over a week ago.

Catalonia is mainly policed by the local Mossos d’Esquadra. The paramilitary Guardia Civil, strongly associated in some people’s minds with the fascist dictatorship, is rarely seen in the region.

There were steel barriers and a heavy police presence outside the Palau de la Generalitat, the seat of the Catalan government, on Wednesday. Outside the finance ministry, Joan Tardà, a Catalan MP, appealed for calm.

“They’re trying to derail us,” he told the crowd. “Our strength lies in being resolute, but in a civilised and peaceful manner.”

Speaking on Wednesday morning, the prime minister defended the government’s actions, saying Puigdemont and his supporters were trying to “eliminate the constitution” and were ignoring the law.

“Logically, the state has to react,” he said. “There is no democratic state in the world that would accept what these people are trying to do. They’ve been warned and they know the referendum can’t take place.”

The raids signal a significant escalation of Madrid’s efforts to stop the vote from proceeding – as do remarks from the Spanish foreign minister, who has accused some separatists of using a “Nazi” approach to intimidate Catalan mayors opposed to secession.