FORMER First Minister Alex Salmond has claimed Scotland will be independent within four years and vowed to play “whatever part is necessary” in a second referendum campaign.

He insisted the people of Scotland will vote Yes and said Brexit will determine the timing of another independence referendum.

His comments came as Scotland’s leading historian Tom Devine suggested there is a “slowly opening window” of opportunity to ensure Brexit never happens.

Devine pointed out: “Last year the UK had the highest growth rate in Europe; and this year the lowest. The sustained fall in Sterling has pushed up inflation and the Bank of England has started to consider raising interest rates. As this story unfolds, a slowly opening window rather than a chink of light might now seem a more appropriate metaphor.”

Salmond, who was ousted as an MP by Conservative Douglas Ross at the General Election, said: “I think Scotland will become independent, I think that was rendered inevitable when the Scottish Parliament was established.

“The timing has always been the interesting thing and I think the timing and outcome of Brexit will dictate the timing of another referendum and therefore the timing of independence, in the medium term.

“If Brexit is a soaraway success, the best thing since sliced bread, then I think that will postpone another referendum but I don't know anyone who thinks that now."

He added, “So therefore I think a (second independence) referendum will be at some point in the next three to four years, depending on the transitional period of Brexit, and I think the result will be a Yes.”

Salmond’s scepticism about whether a success can be made of Brexit is echoed by Devine, who has pointed to an increasing awareness of the “dark economic clouds” which he said could mean “the English, because it was they who produced the decisive majority for Leave, might yet come to their senses.”

Salmond said he will play “whatever part is necessary” in a future referendum campaign.

When asked if he would stand as an MP at the next election, the 62-year-old said: “I'm not ruling it out. The timing is not in my hands, I mean Theresa May didn't know when the last election was until she was up a Welsh mountain and she probably regrets climbing it.”

Salmond made the comments while promoting his Edinburgh festival show, which will feature invited guests, music and comedy, and is co-produced by a former SNP MP and close friend Tasmina Ahmed-Sheikh.

Salmond added: “There are things you can't say in office that you can say out of office. And there are things you can do out of office that you can't do in office, not just as First Minister, but as an MP you can't just swan off to the Edinburgh Festival for a couple of weeks, that's not fair on your constituents but luckily my constituents relived me of that responsibility and I'm now able to do it.”

Nicola Sturgeon, who had initially called for an independence referendum to be held in the autumn of 2018 or spring of 2019, told MSPs before the summer recess she would delay her plans to introduce legislation for a referendum.

Then, SNP Westminster leader Ian Blackford announced a refreshing of the SNP’s approach to independence in the Sunday Herald last month, and insisted they must not be constrained by a timetable.

He said the SNP had “to demonstrate how much we could do to promote fairness and equity” under independence. And he promised the SNP would state clearly “what an independent Scotland would look like” in the years ahead.

Blackford added: “I think that what has happened as a consequence of Nicola's statement is that we've taken away the focus from the timetable now and I'm gratified that gives us the opportunity to actually talk about the fundamentals and to talk about what an independent Scotland would look like. And I welcome that over the coming years.”

Responding to Salmond’s comments about independence, a Scottish Labour source said: “Given his history of unhelpful comments, Nicola Sturgeon must hope Alex Salmond's fringe show is one that gets cancelled early.”

Scottish Conservative deputy leader Jackson Carlaw MSP said: “It is clear that Alex Salmond has learned nothing from his election defeat. The SNP's obsession with independence and a subsequent lack of focus on education, health and the economy was a key factor in the widespread losses suffered by his party in June.

“Voters sent a clear message that they are fed up hearing about a second referendum, but it seems Mr Salmond, along with many others in the SNP, are still not listening.”

An SNP spokesman said last night: "Don't really have much to add to Alex's comments to be honest. Not really anything he hasn't said before e.g indy inevitable, outcome of Brexit will dictate timing, devolution didn't kill nationalism stone dead - it had the opposite effect etc."

Salmond also used his appearance at the Edinburgh Festival to throw his weight behind former SNP MP Michelle Thomson – who withdrew from the SNP whip in 2015 when a police inquiry into allegations of mortgage fraud was launched.

The former Edinburgh West MP was told last month that she will not face court proceedings and asked for an apology from SNP leader Nicola Sturgeon.

Salmond said the situation was "handled badly" by the party and said he had been a "strong supporter of her". He wants to see her return to the party.

Salmond also took aim at the media over its reporting of the situation. Speaking at a press conference ahead of his first show at the Edinburgh Festival, he said: "Although I think the SNP made a mistake, they weren't the instigators of the mistake.

"The people who bear the heaviest burden of responsibility for the position that Michelle is in now and has been over the last two years are your publications.

"That should be reflected upon because (the media) have effectively removed the political career of someone I thought was an incredibly talented female politician and that is greatly to be regretted."

Thomson said "she very much welcomes the ongoing support" of Salmond and is looking forward to a "frank meeting" with the First Minister.