ALEX Salmond has held secret talks with the Spanish government to clear the way for an independent Scotland to join the European Union, the Sunday Herald can reveal.

At Spain's request, the First Minister met the country's foreign minister, Jose Manuel Garcia-Margallo, during a "business" trip to the country last week. It is understood Garcia-Margallo gave a commitment that the newly-elected government of Mariano Rajoy would not veto Scotland joining the EU if there is a Yes vote in the 2014 independence referendum.

There has been speculation for months that the EU powerhouse might try to block Scottish membership in case it fuelled separatist movements in Catalonia and the Basque country, leading to the break-up of Spain.

Spain refused to accept Kosovo's existence as an independent state after it unilaterally seceded from Serbia in 2008, and in anonymous briefings to the press, UK government ministers have suggested Spain might take the same line over Scotland.

An official House of Commons briefing paper has also raised the prospect of a veto by EU "member states with their own internal regional independence issues, such as Spain".

The First Minister has tried to downplay the issue by saying Scottish independence would be "sui generis", or unique, and so would not have direct implications for other countries.

Salmond visited Spain last week ostensibly to promote links on renewable energy, announcing a new tie-up between Strathclyde University and the Spanish owner of ScottishPower, Iberdrola.

In its public pronouncements on the trip, the Scottish Government made no reference to diplomatic discussions.

However, the Sunday Herald can reveal that while in Madrid on Tuesday, Salmond had an "informal" meeting with Garcia-Margallo which included the subject of Scottish independence.

Earlier this year, Garcia-Margallo was quoted in press reports denying that Spain had a problem with Scotland becoming independent.

It is understood that the foreign minister wanted a face-to-face meeting to spell out exactly what the government's position was.

He told Salmond that Spain would be relaxed if Scotland became independent, and said that Spain would not veto EU membership.

Given it is a key plank of SNP policy that an independent Scotland should take its place alongside other EU nations in Brussels, Salmond was believed to be delighted with the outcome.

Scottish LibDem leader Willie Rennie said the First Minister should have been more open about a meeting on such an important issue.

He said: "There's clearly been an issue over Scotland's possible membership of the EU, or Alex Salmond would not have gone to see the Spanish foreign minister and keep it secret.

"The First Minister is not usually shy. It's important that we now know exactly what has been discussed so voters can be fully informed."

Salmond's spokesman said: "The First Minister was on a business and economic related visit to Madrid in which he announced, among other things, the inauguration of a crucial international MBA programme established by Ibedrola with Strathclyde and Madrid universities. He also took the opportunity to meet informally with leading Spanish figures.

"Among these public figures was Foreign Minister Jose Manuel Garcia-Margallo. Informal meetings are by their nature private, but the subjects under discussion included European finance and energy policy."