It's catching.

The contagion of omnishambles, which has been raging uncontrolled in Westminster these past months, appears to have spread north and infected the Scottish Government. Or perhaps that should be "omniboorach". It was certainly a mess. It is simply not possible to reconcile what the First Minister, Alex Salmond, said to Andrew Neil in the now infamous Sunday Politics interview in March, and what the Deputy First Minister, Nicola Sturgeon, said in her statement in the Scottish Parliament this week.

The First Minister said he had legal advice from the Government's law officers on the question of whether or not Scotland would be granted immediate EU membership after independence. When asked by Mr Neil to produce this, he said he could not disclose the legal advice because, under the ministerial code, governments do not publish advice to ministers. But this week, in Holyrood, the Deputy First Minister revealed there was no such formal legal advice.

Mr Salmond insists what he was referring to in the Neil interview was legal advice "in general terms" that was already available in Government documents. And maybe that was what he meant. But why then did he say it couldn't be published? And why did the Government spend a large sum of public money taking the Information Commissioner, Rosemary Agnew, to court to prevent the disclosure of a blank sheet of paper?

There are very good reasons why ministers are reluctant to disclose legal advice. They have to be able to discuss issues freely with their advisers and hear differing views in private before they come to a decision. But if there was no legal advice, as Ms Sturgeon says, there can be no good reasons for concealing it. It's not exactly a state secret that the Government dis'nae ken.

The scandal wasn't the confusion over language, but the heavy-handed approach to the freedom of information watchdog, Ms Agnew. The Scottish Information Commissioner ruled in July it was in the public's interest for the Government to state whether or not such advice on EU membership existed. Shamefully, the Scottish Government appealed against this decision. What kind of behaviour is that for a party that has always claimed to support freedom of information?

Was the First Minister a "bare-faced liar", as Labour MSPs put it, using unparliamentary language (is this term now acceptable in Holyrood?). No – politicians very rarely lie. But he did perhaps embellish the truth. Mr Salmond's interview conveyed the impression he had the full backing from the Government's law officers for his contention that Scotland would automatically be granted entry to the EU after independence. He suggested the matter was done and dusted; signed and sealed by m'learned friends, when of course these things never are.

Now, I actually agree with the First Minister on EU entry. It seems to me inconceivable the European Union would refuse to allow an independent Scotland, with all its oil and natural resources, to remain a part of the European Union. Scotland has been subject to EU law for 20 years and would therefore be regarded as a succession state, just as England or "Residual UK" would be regarded as a pre-existing EU entity. That's not to say there wouldn't be negotiations and formal procedures to go through, which might take some time and effort to resolve.

England might find its voting weight on the Council of Ministers would be significantly reduced. Scotland would have to negotiate its contributions to the EU budget. There would be issues to do with the Shengen agreement which allows free movement across borders of most EU states. Would Scotland be required to commit to joining the European single currency, at least in principle? The idea that for some reason Brussels would blackball Scotland is ridiculous. In 2004 it allowed a whole raft of recently independent small states in central and eastern Europe to become members, and Scotland would be accorded the same rights.

However, lawyers are not paid to state the obvious. Their job is to explore juridical contradictions and identify potential legal obstacles. And it is certainly the case that statements from European officials on Scottish membership have been ambiguous and open to interpretation. The President of the European Commission, Jose Manuel Barroso, launched a whole flotilla of legal opinions last month when he was asked directly about the Scottish situation on the BBC's World at One. "A new state if it wants to join the EU," said the EU President, "has to apply to become a member like any state ... and the other EU members would have to agree." He was choosing his words very carefully of course, and gave no grounds for supposing that such application would be denied. But the hypothetical possibility always exists that some legal objection might be raised against either Scotland or England remaining in the EU.

This has little to do with this week's euroshambles. I suspect Nicola Sturgeon, who has only recently taken over as the Cabinet Secretary with responsibility for the constitution and the referendum campaign, realised the Government was on a hiding to nothing taking the Information Commissioner to court to prevent voters knowing the Government knew nothing. She took the opportunity presented by the Edinburgh Agreement to draw a line under this issue, and abandon litigation which should never have been launched in the first place.

Is it the end for Mr Salmond? Might he have to resign, like the Labour First Minister Henry McLeish, over "a muddle not a fiddle". No – the First Minister will tough it out. But he has, perhaps for the first time since he came to office, been made to look ridiculous. Not so much defending the indefensible, but defending the indefinable. This is a crucial moment for the SNP. It comes in the week when the Government experienced its first serious split, with the resignations of two MSPs, John Finnie and Jean Urquhart, over the issue of Nato membership. Once things start going wrong in Government, they often keep going wrong – especially when ministers aren't actually doing very much in terms of domestic policy. A series of unforced errors has undermined this Government's hard-won reputation for competence, unity and probity. That's enough for one week.