The Spanish government has called the prospect of Scottish independence a catastrophe that would worsen the economic slump in Europe and risk the EU's disintegration.

In the strongest and most apocalyptic intervention from Europe to date in the increasingly divisive Scottish debate, Prime Minister Mariano Rajoy told parliament in Madrid that all of the EU's leaders were aghast at the idea of an independent Scotland.

Seeking to contain his own separatist movements in Catalonia and the Basque Country, Rajoy did not say he would block a Scottish bid to join the EU and pointed to the differences between the UK and Spain. But he made it plain he viewed Alex Salmond's hopes or declarations concerning an 18-month transition to Scottish membership of the EU as a pipe dream, views echoed less stridently by senior policymakers in Brussels.

Scottish secession would be a catastrophe, declared the Spanish foreign minister, José Manuel García-Margallo. "It would start a process of Balkanisation that nobody in Europe wants."

Rajoy underlined the extent of EU elite's opposition to an independent Scotland. "Everyone in Europe thinks that these processes are tremendously negative because they generate economic recessions and more poverty for everyone," he said. Scottish secession would be a "torpedo to the vulnerabilities of the EU, which was created to integrate states, not to fragment them. Strong states are what's needed today."

Rajoy's striking intervention on the eve of the vote is easily the strongest denunciation of Scottish nationalist ambitions to come from an EU government. Apprehension is considerable in Brussels and across EU capitals, with a consensus emerging that Scottish hopes of a quick and easy entry to the EU as a separate state are futile and misplaced.

"If the yes vote were to win, this would create an unprecedented situation for the EU's leaders, who would have no clear jurisprudence on the basis of which the EU or its member states might formulate their response," said Yves Bertoncini of the Paris thinktank, Notre Europe.

"If Scotland were to opt for separation, it would be a brand new country that would have no guarantee of becoming a member of the EU … It would plunge [the EU] into negotiations that it would very much prefer to avoid."

Gianni Pittella, the Italian leader of the social democrats in the European parliament, posed for pictures with no campaigners and denounced separatism.

"We are deeply concerned about the prospect of a yes vote in the Scottish referendum," he said. "It doesn't seem to us that abandoning the UK would turn out to be a wise step to take. It is clear Scotland's admission to the EU will not be as automatic and easy as yes supporters claim. It will take years. "Scotland will have to apply to become a new member state and the accession will have to be approved by all other member states – a situation which will not be easy, especially when many countries are worried about the implications for independence movements at home."

He cited "a very long list of disadvantages", from customs controls on the "English" border to tariffs on exports, to the need to join the embattled euro currency and the Schengen passport-free travel zone, to the loss of UK exemptions and its EU budget rebate, to issues with fisheries. "No new member has been accorded such special treatment."

Rajoy pointedly stated that it had taken Spain eight years to negotiate EU membership and that it took much longer for the last country to join – Croatia – last year. "It is clear that if one part of a state separates, it converts itself into a third territory with respect to the EU … They can ask to be integrated and begin a process that could take years," he said.

Salmond, Scotland's first minister, has long argued that it would be possible for the country to renegotiate membership of the EU from within. In a speech on the subject in April, he said it would be absurd to deny the people of Scotland entry.

"The Scottish government recognises that continued membership of the EU will require negotiations on the specific terms. That is only right and proper, but these negotiations will be completed within the 18-month period between a yes vote in September and achieving independence in March 2016," he said. "Scotland will ask for continued membership on the basis of 'continuity of effect'."

"Five and a quarter million people ceasing to be EU citizens against their will … is more than absurd. There is simply no legal basis in the EU treaties for any such proposition. And it is against the founding principles of the European Union."