ALEX Salmond last night accused the British and Spanish governments of plotting "hand in glove" to frustrate a Yes vote in the referendum, after it emerged UK officials last week visited Madrid to discuss Scottish independence.

The First Minister claimed there was a "stitch-up" between David Cameron and Spanish Prime ­Minister Mariano Rajoy.

"Mr Rajoy is speaking for David Cameron and the Tories by proxy," Salmond said.

The Scottish Conservatives accused the First Minister of "paranoia" and Downing Street dismissed claims of Cameron influencing the Spanish government as laughable.

Salmond's ferocious attack follows a damaging intervention by Rajoy that cast doubt on the SNP case that it would be straightforward for an independent Scotland to be an EU member.

Threatened by a popular break-away movement in Catalonia, Spain's most prosperous region, Rajoy said earlier this month that if part of an EU state chose independence, it would put itself outside the EU and need to apply for re-entry.

"This is a fact - it's neither a value judgment nor an opinion, it's simply a fact," he said.

For an independent Scotland to be an EU state, all 28 members would have to agree. Spain could veto Scottish entry, or, more likely, make entry very slow and difficult to send a warning to Catalan nationalists.

Rajoy's comments were deeply awkward for Salmond, who insists Scotland could not be cast out of the EU and would negotiate entry during the 18 months after a Yes vote in which the country was still part of the UK and hence of Europe.

However, it has now emerged a Cabinet Office official working on Scottish constitutional issues and Andrew Dunlop, Downing Street's Scotland adviser, flew to Madrid last week to discuss the Scottish referendum. It is understood the pair travelled to Spain at the invitation of the Rajoy government.

The First Minister claimed the meeting showed London and Madrid working jointly on scaremongering for the No campaign.

Salmond told the Sunday Herald: "David Cameron's Spanish stitch-up exposes the fact that anything the Prime Minister of Spain says about Scotland is at the behest of the Westminster Tory government.

"We now know that the Prime Minister sanctioned Downing Street plotting with their Spanish counterparts to interfere in Scotland's referendum, and they are clearly working hand in glove."

Jackson Carlaw, deputy leader of the Scottish Tories, said: "People will wonder if Alex Salmond's been on the Christmas sherry early."

He added: "The First Minister risks rubbing the Spanish up the wrong way with this kind of childish rhetoric."

A Downing Street spokesman said: "It is quite common for UK Government officials to meet officials in other European Governments to discuss issues of common interest - any suggestion that our policy officials can tell the Spanish Government how to run their own domestic affairs is laughable."