Constitutional lawyers remain at loggerheads over whether an independent Scotland would remain part of the EU.

A handful of the UK's leading legal experts clashed on Thursday (23 January) as they gave evidence to the Scottish parliament's European and External relations committee in Edinburgh.

Student or retired? Then this plan is for you.

Scotland would become a legal test-case if it votes for independence in September but seeks to retain its membership of the EU.

The Scottish government believes that it can fast-track its membership bid by using article 48 of the EU treaty which would involve an amendment to the treaties rather than the formal application process spelt out in article 49, which has been required for previous accession countries.

Addressing members of the Scottish parliament, Sir David Edwards, formerly a judge at the European Court of Justice, endorsed the plan, commented that it would require “relatively small" changes to the treaties.

He also took issue with EU officials who have insisted that an independent Scotland would start from the same starting point as previous EU applicant countries.

"I was judge of the European Court for 14 years. I remember repeated occasions where politicians have asserted positions which the court has found to be wrong," he said.

"There is a gap between the vote and independence, and in that period you have an obligation to negotiate a solution to the problem," he added.

Both European Commission president Jose Manuel Barroso and his EU Council counterpart Herman van Rompuy have indicated that Scotland would be treated the same way as previous applicants.

But Kenneth Armstrong, a professor of law at Cambridge university, described the article 48 route as "legally implausible and incredibly politically risky."

"It is a way of renegotiating the treaties between existing member states, and not with some other non-member state," he said.

Westminster is clear that voting to leave the UK would also be a vote to exit the EU. If it wins the referendum in September, the Scottish government has allotted 18 months to negotiate the terms of its departure from the UK and its EU membership, before declaring independence in March 2016.

The UK government is clear that Scotland would have no trouble conforming to the EU rule-book - known as the acquis communautaire - and that it would not attempt to obstruct or delay a Scottish EU membership application.

But ministers argue that the short time-line would weaken Scottish first minister Alex Salmond's hand in securing attractive membership terms.

"A deal with a date" amounts to "a negotiating position of spectacular weakness," Scottish Secretary Alistair Carmichael said during a speech in Brussels this week, adding that Salmond's plan would involve the EU's 28 members agreeing to re-write the bloc's seven year budget and the Common Agricultural Policy.

For his part, Aiden O'Neill, an expert on EU constitutional law, said that EU leaders would be keen to avoid a legal minefield whereby EU nationals living in Scotland could lose their citizenship rights in the event of independence.

"If one were to posit the possible nightmare scenario of Scotland being independent outside the EU with British nationality no longer afforded to Scottish citizens, then EU nationals here are no longer within the EU and no longer have claims against an independent Scotland for their EU rights.

"Something will be worked out, it always is."